Images going out of the page in PDF output

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

Images going out of the page in PDF output

Postby Nettem on Thu Feb 07, 2019 2:09 am

We have used CHM output and HTML output till now. But now there is requirement for PDF output. The images are now being restricted by the size of PDF output like A4 size. Some parts of the images are going out of the page. But i don't want to resize the images individually, because we have a lot of linked files and the the total documentation is around 2000 pages. So is there any option so that the image gets resized automatically like "fit to width" or "fit to length" or "fit to page" for PDF output.
Nettem
Jr. Propeller Head
 
Posts: 5
Joined: Tue Dec 25, 2018 11:05 pm

Re: Images going out of the page in PDF output

Postby Nita Beck on Thu Feb 07, 2019 7:51 am

Two things come to mind:

-- So you are not setting explicit sizes on the images? If you have, those sizes are being set by inline formatting and making a stylesheet change isn't going to help.
-- Assuming you are not setting explicit sizes, you can make a stylesheet change in the medium you use for PDF output. For the base img class, set its max-width to 100%. That way, no image in PDF will exceed the width of its container.

HTH
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3276
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Images going out of the page in PDF output

Postby Nettem on Mon Feb 11, 2019 10:03 pm

The CHM and HTML are created by some other person.
There was actually no image style created in the style sheet before.
I think all the images were just inserted and were not resized, because all the image properties are set to default.
I have tried the second way mentioned by you, I made a style sheet change and the output did not change because the images had no "style class" selected earlier. So, i changed the style class of few images which were running out of the page to new style class created. Now they are inside the page.
So this solves one of my problem, But still i need to do it for all the images individually, which is very much time consuming.
Nettem
Jr. Propeller Head
 
Posts: 5
Joined: Tue Dec 25, 2018 11:05 pm

Re: Images going out of the page in PDF output

Postby Nettem on Tue Apr 09, 2019 10:48 pm

I figured out the way to do it.
From the image in the stylesheet, i selected max height and max width, and set them to 100.
But i also got an another problem here, the aspect ratio seems to change, this is probably because the flare compares the size of the image and the size of the page and if the any dimension of the image exceeds the size of the page then it resizes the image to fit inside the page in that particular direction.
It doesn't seem to care about the aspect ratio and resize the image the whole image. This makes some content to look very odd in PDF Format.
Nettem
Jr. Propeller Head
 
Posts: 5
Joined: Tue Dec 25, 2018 11:05 pm

Re: Images going out of the page in PDF output

Postby Dave Lee on Wed Apr 10, 2019 12:44 am

Don't set both max-width and max-height; just set one, e.g. max-width if most of the images are landscape, or max-height if most are portrait.
Dave Lee
Master Propellus Maximus
 
Posts: 5616
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Images going out of the page in PDF output

Postby Nettem on Wed Apr 10, 2019 1:12 am

It is not possible to use this method because as we also got some images which are in portrait as some of them needs to be resized. But most of them are in Landscape, so it will help for a few of them but will not be useful for all of them. Thank you for the partial solution.
So one way of doing it is to set two different image classes as Landscape and Portraits and use max height and max width appropriately.

So is there any otherway of doing it, than changing the whole image classes and selecting the stuff.
Nettem
Jr. Propeller Head
 
Posts: 5
Joined: Tue Dec 25, 2018 11:05 pm

Re: Images going out of the page in PDF output

Postby ChoccieMuffin on Wed Apr 10, 2019 4:01 am

If MOST of your images are landscape, then set max-width: 100% on the base img style. You can then add an extra style class, for example img.portrait, and set max-height: 100% and max-width: auto, then apply that img style class ONLY to images that don't fit. Or if most of your images are portrait, do it the other way round.
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2075
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 2 guests