[NTG-context] Merging PDF document of various page sizes. Can ConTeXt help?

Gerben Wierda gerben.wierda at rna.nl
Fri Jan 13 18:49:36 CET 2012


Weirder still.

\definepapersize[large][a3,landscape]
\definepapersize[small][a4,portrait]
\setuppapersize[large]
\starttext
\externalfigure[foo.pdf]
\page\setuppapersize[small]
\externalfigure[bar.pdf]
\stoptext

The first page is now 11.69x11.69 inch and the second page is a4, but landscape

So, let's make sure I use both layout size and print size in my definitions

\definepapersize[large][a3,landscape][a3,landscape]
\definepapersize[small][a4,portrait][a4,portrait]
\setuppapersize[large]
\starttext
\externalfigure[foo.pdf][factor=fit]
\page\setuppapersize[small]
\externalfigure[bar.pdf][factor=fit]
\stoptext

Now both pages are a4 landscape. Another go:

\setuppapersize[a3,landscape][a3,landscape]
\starttext
\externalfigure[BoudewijndeHaasOpgave2Totaalview.pdf][factor=fit]
\page\setuppapersize[a4,portrait][a4,portrait]
\externalfigure[FredRademakerOpgave2Totaalview.pdf][factor=fit]
\stoptext

Both a4 landscape again.

Does this stuff work at all? Another go

\setuppapersize[A3,landscape][A3,landscape]
\starttext
\externalfigure[foo.pdf][factor=fit]
\page\setuppapersize[A4,portrait][A4,portrait]
\externalfigure[bar.pdf][factor=fit]
\stoptext

Hmm, this works. I originally used lower case a4 and a3, as I saw that in an example somewhere. But somewhere else I saw A3, A4 etc. 


G

On 13 Jan 2012, at 18:15, Gerben Wierda wrote:

> It still is weird. It sometimes work (but not completely) and sometimes not. For instance
> 
> \definepapersize[a3landscape][A3,landscape]
> \definepapersize[a4portrait][A4,portrait]
> \setuppapersize[a3landscape]
> \starttext
> \externalfigure[foo.pdf]
> \stoptext
> 
> foo.pdf is a 18.43x13.88 inch PDF image
> The end result is a 16.54x16.54 inch PDF image with the embedded image cropped.
> 
> ??
> 
> G
> 
> On 13 Jan 2012, at 16:47, luigi scarso wrote:
> 
>> 
>> 
>> On Fri, Jan 13, 2012 at 4:44 PM, Gerben Wierda <gerben.wierda at rna.nl> wrote:
>> Answering my own question, quite simple with ConTeXt:
>> 
>> \definepapersize[a3landscape][A3,landscape]
>> \definepapersize[a4portrait][A4,portrait]
>> \setuppapersize[a4portrait]
>> \starttext
>> \externalfigure[foo.pdf]
>> \page\setuppapersize[a3landscape]
>> \externalfigure[bar.pdf]
>> \stoptext
>> 
>> G
>> 
>> PS. The solution below does not work because it keeps the sizes of the images and does not set page sizes for the pages where the images are embedded.
>> 
>> Ah ok, you don't want to inherit the pagesize from the external pdf.
>> 
>> -- 
>> luigi
>> 
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>> 
>> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20120113/869cbad7/attachment.html>


More information about the ntg-context mailing list