W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2011

Re: Keep page size of imported PDF when 11 x 17

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Sun, 03 Apr 2011 21:22:15 -0400
Message-Id: <>
To: "www-xsl-fo@w3.org" <www-xsl-fo@w3.org>
At 2011-03-10 21:55 -0600, Mario Madunic wrote:
>In my XSLT there is an option to insert an 
>entire PDF page by page and sometimes they do 
>contain an 11 x 17 schematic and the current 
>page size is 8.5 x 11 for the finished PDF. The 
>info I have of the PDF to insert dynamically is: 
>filename, number of pages, and pages that might 
>be 11 x 17. So I have the info required to do 
>the insert (via fo:external-graphic) but the 11 
>x 17 is scaled down to 8.5 x 11. What can I do 
>to prevent the scale down of the image.

Remove all margins and make the body size the size of the page.

But there is still a problem:  in XSL-FO you 
cannot dynamically change page geometry in the 
middle of a page sequence.  As you are flowing 
onto 8.5x11 you can't on a whim say "the next page is to be 11x17".

However, you can say just that with Crane's free PSMI:


... but that requires a post-process.  But it is 
still accomplishes what you need without human intervention.

>Iā€™m guessing that because the page that the 11 
>x 17 belongs to contains also an 8.5 x 11 (on 
>the backside), is probably a problem. Is it as 
>simple as inserting an 11 x 17 as the backside?
>Any insight will be appreciated.

If the inserted pages do not impact on page 
numbering, you might consider a post-process of 
the PDF where using a tool like iText you can 
inject PDF pages from another source into a 
stream you create from your composed PDF pages.

Actually, this would also work if they did impact 
on page numbering by formatting placebo pages 
that are replaced with the external PDF pages as 
you stream through your content.

I hope this helps.  Please pardon my tardy response but I've been on leave.

. . . . . . . . . Ken

Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
Received on Monday, 4 April 2011 01:22:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:14 UTC