Difference between revisions of "Command/filterpages"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \filterpages")
 
 
Line 28: Line 28:
 
     <cd:parameter name="category">
 
     <cd:parameter name="category">
 
       <cd:paramdoc></cd:paramdoc>
 
       <cd:paramdoc></cd:paramdoc>
       <cd:constant type="cd:name">A category that is passed on to {{cmd|externalfigure}}. See that command for further explanation.</cd:constant>
+
       <cd:constant type="cd:name">A set of {{cmd|externalfigure}} settings, as defined by {{cmd|defineexternalfigure}}</cd:constant>
 
     </cd:parameter>
 
     </cd:parameter>
 
     </cd:assignments>
 
     </cd:assignments>
Line 43: Line 43:
 
<texcode>
 
<texcode>
 
\filterpages[file.pdf][1,3,4:6][width=18cm]
 
\filterpages[file.pdf][1,3,4:6][width=18cm]
 +
</texcode></cd:example><cd:example title=""><texcode>
 +
\defineexternalfigure[inframe][option=frame,factor=fit]
 +
\filterpages[pagetest][odd][category=inframe]
 
</texcode></cd:example></cd:examples>
 
</texcode></cd:example></cd:examples>
 
<cd:notes></cd:notes>
 
<cd:notes></cd:notes>
Line 51: Line 54:
 
<cd:commandref name="copypages">to insert pages from 1 to 'n' from another PDF</cd:commandref>
 
<cd:commandref name="copypages">to insert pages from 1 to 'n' from another PDF</cd:commandref>
 
<cd:commandref name="insertpages">to insert pages from 1 to 'n' from another PDF, with extra blank pages at specific locations</cd:commandref>
 
<cd:commandref name="insertpages">to insert pages from 1 to 'n' from another PDF, with extra blank pages at specific locations</cd:commandref>
<cd:commandref name="startpagefigure">to insert a figure as a separate page</cd:commandref></cd:seealso>
+
<cd:commandref name="startpagefigure">to insert a figure as a separate page</cd:commandref>
 +
<cd:commandref name="defineexternalfigure"></cd:commandref></cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Latest revision as of 11:07, 15 November 2021


\filterpages

Summary

The command \filterpages is used to insert pages from another PDF file

Settings

\filterpages[...][...,...][...=...,...]
[...]file
[...,...]even odd number number:number
widthdimension
nnumber
categoryname

OptionExplanation
even Select even pages (actual pdf page 2, 4, 6, etc.)
odd Select odd pages (actual pdf page 1, 3, 5, etc.)
number Select a single page. Can be combined with other single pages or page ranges.
number:number Select a range of pages. Can be combined with other single pages or page ranges.
width
dimension Rescales the included page(s) to this width
n
number Number of pages (does not actually work currently)
category
name A set of \externalfigure settings, as defined by \defineexternalfigure

Description

Insert pages from another PDF file as pages in the current document. One can cherry-pick specific pages or page ranges.

Please note that the inserted pages will be placed on your ConTeXt pages like a new "layer", or floating object. This means that your existing headers, footers, crop marks will still be printed on top of or behind the inserted pages.

If you want to insert pages as completely independent pages between your existing ConTeXt pages, use \startpagefigure.

Examples

Example 1

Insert page 1, and 3 through 6, of file.pdf:

\filterpages[file.pdf][1,3,4:6][width=18cm]

Example 2

\defineexternalfigure[inframe][option=frame,factor=fit]
\filterpages[pagetest][odd][category=inframe]

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: