ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda <gerben.wierda@rna.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Merging PDF document of various page sizes. Can ConTeXt help?
Date: Fri, 13 Jan 2012 18:49:36 +0100	[thread overview]
Message-ID: <F038052E-5519-4712-A20A-5B2E2F7A2262@rna.nl> (raw)
In-Reply-To: <70431971-7CBC-4598-996E-085E00B7233C@rna.nl>


[-- Attachment #1.1: Type: text/plain, Size: 3600 bytes --]

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@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@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@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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5527 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@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
___________________________________________________________________________________

  reply	other threads:[~2012-01-13 17:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 15:20 Gerben Wierda
2012-01-13 15:26 ` luigi scarso
2012-01-13 15:27 ` Mojca Miklavec
2012-01-13 15:44   ` Gerben Wierda
2012-01-13 15:47     ` luigi scarso
2012-01-13 17:15       ` Gerben Wierda
2012-01-13 17:49         ` Gerben Wierda [this message]
2012-01-13 22:43 ` Aditya Mahajan
2012-01-13 22:57   ` Gerben Wierda
2012-01-13 23:03     ` Aditya Mahajan
2012-01-13 23:15       ` Gerben Wierda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F038052E-5519-4712-A20A-5B2E2F7A2262@rna.nl \
    --to=gerben.wierda@rna.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).