You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Patrick <pt...@trey-industries.com> on 2009/03/30 18:23:09 UTC

Fixed Column Width not working.

I am trying to create a PDF with very precise measurements. I have a table with
fixed column widths in millimeters. When I view or print the form, the column
widths are too small. They are smaller than their specified sizes by varying
degrees. For example, column 1 should be 45mm, but on the printout, it's about
42mm. I can't figure out what's wrong. Here is piece of my code:

<fo:table font-family="Helvetica" font-size="6pt" table-layout="fixed"
border-top-width="0.5pt" border-left-width="0.5pt" border-right-width="0.5pt"
border-bottom-width="0.5pt" border-style="solid" border-color="black"
padding="0mm">
   <fo:table-column column-width="45mm"/>
   <fo:table-column column-width="40.5mm"/>
   <fo:table-column column-width="19mm"/>
   <fo:table-column column-width="16.5mm"/>
   <fo:table-column column-width="76mm"/>

I think this is fairly straight forward. Thanks in advance for your help.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Fixed Column Width not working.

Posted by Patrick <pt...@trey-industries.com>.
> So the margins you specified in FO lie outside the printable area
> supported by your printer.

The margins are 1/4", which my printer supports. I'm not sure why those didn't
work, but that's OK.

> Other people had the same problem (you can check the archives). They
> switched off the scaling in Acrobat's print dialog and they confirmed
> that the dimensions specified in FO were correct when printed out. There
> is no bug in FOP concerning that. It's a user setting in Acrobat which
> FOP doesn't have an influence on. So I don't know how to help you any
> further with this. Sorry.

I searched the archives and couldn't find the problem, but now that I know what
I'm looking for, I can probably find more info. Do you know if a PDF would be
capable of containing print settings that I could code into my form? Would that
be a feature worth requesting or is it impossible?

I think I may have figured out a way to make it work without requiring the user
to turn of scaling. For some reason, Adobe always scales my documents to 94% for
all of my forms. If I adjust my measurements to compensate for that, then the
printout comes out fine. What I still don't understand is why Adobe is doing
this scaling. My form, margins included, is smaller than the 8.5x11 paper that
it's printing on. Would the amount that it's adjusting be different on different
printers? I would think that it would be the same for the same paper size
regardless of the printer.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Fixed Column Width not working.

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 30.03.2009 23:07:48 Patrick wrote:
> Sorry, but I'm still confused. I have the margins defined in my
> fo:simple-page-master tag. Does that information not end up in my final PDF?

No. I don't know of any means to place that information in a PDF
(version 1.4 anyway). There might be something in Tagged PDF but only
indirectly through the "BBox" value which I think is not implemented,
yet, in the development branch that adds Tagged PDF. Even then, I don't
think Acrobat would pick that up. Turning on scaling in Acrobat's print
dialog would still distort the page.

> When I turn off the scaling, the text on the left side of my document gets cut
> off.

So the margins you specified in FO lie outside the printable area
supported by your printer.

> Something still isn't right. I also won't be able to get my users to turn
> off the scaling. I need to come up with a solution that doesn't require user
> interaction. Thank you for your help.

Other people had the same problem (you can check the archives). They
switched off the scaling in Acrobat's print dialog and they confirmed
that the dimensions specified in FO were correct when printed out. There
is no bug in FOP concerning that. It's a user setting in Acrobat which
FOP doesn't have an influence on. So I don't know how to help you any
further with this. Sorry.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Fixed Column Width not working.

Posted by Patrick <pt...@trey-industries.com>.
Sorry, but I'm still confused. I have the margins defined in my
fo:simple-page-master tag. Does that information not end up in my final PDF?
When I turn off the scaling, the text on the left side of my document gets cut
off. Something still isn't right. I also won't be able to get my users to turn
off the scaling. I need to come up with a solution that doesn't require user
interaction. Thank you for your help.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Fixed Column Width not working.

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Acrobat scales down your PDF so it fully fits inside the printable area
of your printer. Acrobat doesn't know the margins of your document
because that information isn't in the PDF. That's why it squeezes the
content even if it isn't necessary to avoid content being cut off. I
hope that clears it up.

On 30.03.2009 22:44:51 Patrick wrote:
> That does seem to have an effect on my problem, but I don't understand what is
> happening. The FAQ indicates that it is a problem when the paper size of the PDF
> and the selected paper don't match. In my case, the paper size of the PDF is 8.5
> X 11 and so is the paper size for printing. It shouldn't need to adjust the PDF.
> The margins are only 1/4", and there is plenty of room on the right side.
> 


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Fixed Column Width not working.

Posted by Patrick <pt...@trey-industries.com>.
That does seem to have an effect on my problem, but I don't understand what is
happening. The FAQ indicates that it is a problem when the paper size of the PDF
and the selected paper don't match. In my case, the paper size of the PDF is 8.5
X 11 and so is the paper size for printing. It shouldn't need to adjust the PDF.
The margins are only 1/4", and there is plenty of room on the right side.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Fixed Column Width not working.

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Please take a look at this FAQ entry:
http://xmlgraphics.apache.org/fop/faq.html#pdf-print-contortion

It's most probably that.

On 30.03.2009 18:23:09 Patrick wrote:
> I am trying to create a PDF with very precise measurements. I have a table with
> fixed column widths in millimeters. When I view or print the form, the column
> widths are too small. They are smaller than their specified sizes by varying
> degrees. For example, column 1 should be 45mm, but on the printout, it's about
> 42mm. I can't figure out what's wrong. Here is piece of my code:
> 
> <fo:table font-family="Helvetica" font-size="6pt" table-layout="fixed"
> border-top-width="0.5pt" border-left-width="0.5pt" border-right-width="0.5pt"
> border-bottom-width="0.5pt" border-style="solid" border-color="black"
> padding="0mm">
>    <fo:table-column column-width="45mm"/>
>    <fo:table-column column-width="40.5mm"/>
>    <fo:table-column column-width="19mm"/>
>    <fo:table-column column-width="16.5mm"/>
>    <fo:table-column column-width="76mm"/>
> 
> I think this is fairly straight forward. Thanks in advance for your help.
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org