Hello, I'm trying similar code as described on http://wiki.contextgarden.net/Including_pages_from_PDF_document: --- \starttext \filterpages[1.pdf][2][width=15cm] \page \filterpages[1.pdf][2][width=5cm] \stoptext --- But I'm still getting the same picture - scaled to (probably) \textwidth. Bug? My mistake? So how to scale to paper width (or any arbitrary value)? - ConTeXt ver: 2010.11.03 19:42 MKIV fmt: 2010.11.12 int: english/english (latest), WinXP Lukas -- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038
Am 18.11.2010 10:53, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
Hello,
I'm trying similar code as described on http://wiki.contextgarden.net/Including_pages_from_PDF_document:
--- \starttext \filterpages[1.pdf][2][width=15cm] \page \filterpages[1.pdf][2][width=5cm] \stoptext ---
But I'm still getting the same picture - scaled to (probably) \textwidth.
Bug? My mistake?
Only the horizontal shift of \copypages looks fishy (as all other values seem to fit).
So how to scale to paper width (or any arbitrary value)?
maybe \definelayout[fullpage] [height=\paperheight, width=\paperwidth, header=0mm, footer=0mm, margin=0mm, topspace=0mm, bottomspace=0mm, backspace=0mm, ] \starttext \showframe AAA\page \setuplayout[fullpage] \copypages[1.pdf] \setuplayout[reset] \page BBB \stoptext Best wishes, Peter
- ConTeXt ver: 2010.11.03 19:42 MKIV fmt: 2010.11.12 int: english/english (latest), WinXP
Lukas
___________________________________________________________________________________ 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 ___________________________________________________________________________________
On Thu, Nov 18 2010, Peter Rolf wrote:
\setuplayout[fullpage]
"fullpage" is not needed. There is already \setuplayout[page]. Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
Thank you, this works nicely.
Lukas
On Thu, 18 Nov 2010 14:12:36 +0100, Peter Rolf
Am 18.11.2010 10:53, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
Hello,
I'm trying similar code as described on http://wiki.contextgarden.net/Including_pages_from_PDF_document:
--- \starttext \filterpages[1.pdf][2][width=15cm] \page \filterpages[1.pdf][2][width=5cm] \stoptext ---
But I'm still getting the same picture - scaled to (probably) \textwidth.
Bug? My mistake?
Only the horizontal shift of \copypages looks fishy (as all other values seem to fit).
So how to scale to paper width (or any arbitrary value)?
maybe
\definelayout[fullpage] [height=\paperheight, width=\paperwidth, header=0mm, footer=0mm, margin=0mm, topspace=0mm, bottomspace=0mm, backspace=0mm, ]
\starttext \showframe AAA\page \setuplayout[fullpage] \copypages[1.pdf] \setuplayout[reset] \page BBB \stoptext
Best wishes, Peter
-- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038
On 18-11-2010 2:12, Peter Rolf wrote:
Am 18.11.2010 10:53, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
Hello,
I'm trying similar code as described on http://wiki.contextgarden.net/Including_pages_from_PDF_document:
--- \starttext \filterpages[1.pdf][2][width=15cm] \page \filterpages[1.pdf][2][width=5cm] \stoptext ---
commands like \filterpages are for special purposes (and will probably move to modules), you probably want: \starttext \externalfigure[1.pdf][page=2,width=15cm] \page \externalfigure[1.pdf][page=2,width=5cm] \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks all for the answers.
The solution by both Peters works well:
---
\starttext
\filterpages[1.pdf][1:2]
\page
\setuplayout[page]
\filterpages[1.pdf][1:2]
\setuplayout[reset]
\page
\stoptext
---
To Hans:
I really needed to filter out some pages.
(In this case, I wanted to use pages 1-2 from a pdf which has exactly 2 pages, but it won't happen in general - this was only a special sample case.)
My task IN GENERAL is - let's have a pdf of a scanned document. Let it have e.g. 20 pages. And I need to insert pages 1-10 at one place and 16-20 at another place (scanned pages 11-15 won't be used).
These pages are to be placed UNSCALED to the document. So:
- I can't use \externalfigure as it places just ONE specific page to the document.
- I can't use \insertpages as I can determine only the NUMBER of pages to include, but not the FIRST page (see the "n=..." option).
- I can't use \copypages for the same reason as \insertpages.
- So the one possibility is to use \filterpages as it offers possibility to select exact pages or their ranges.
The initial problem was that \filterpages scales inserted pages to \textwidth so I tried to play with the "width" option. And the "width" option works - how exactly? (See the previous trials.)
Best regards,
Lukas
On Fri, 19 Nov 2010 21:44:16 +0100, Hans Hagen
On 18-11-2010 2:12, Peter Rolf wrote:
Am 18.11.2010 10:53, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
Hello,
I'm trying similar code as described on http://wiki.contextgarden.net/Including_pages_from_PDF_document:
--- \starttext \filterpages[1.pdf][2][width=15cm] \page \filterpages[1.pdf][2][width=5cm] \stoptext ---
commands like \filterpages are for special purposes (and will probably move to modules), you probably want:
\starttext \externalfigure[1.pdf][page=2,width=15cm] \page \externalfigure[1.pdf][page=2,width=5cm] \stoptext
On 20-11-2010 1:37, Procházka Lukáš wrote:
- I can't use \externalfigure as it places just ONE specific page to the document.
\dostepwiserecurse{3}{5{1}{ \startTEXpage \externalfigure[whatever.pdf][page=\recurselevel] \stopTEXpage } ---------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Hans Hagen
-
Peter Münster
-
Peter Rolf
-
Procházka Lukáš
-
Procházka Lukáš Ing. - Pontex s. r. o.