[OS X TeX] Include a certain PDF Page as Picture or all at once

Ross Moore ross at ics.mq.edu.au
Sat Apr 17 08:58:10 EDT 2004


On 17/04/2004, at 10:24 PM, Maarten Sneep wrote:

> On 16 apr 2004, at 21:24, Herb Schulz wrote:
>
>> On 4/16/04 2:09 PM, "Franz Sommer" <franz.sommer at gmx.de> wrote:
>>
>>> Is there an option to select a certain page out of pdf-page stack 
>>> and/or is
>>> there opiton to include the entire stack. So far I've played arround 
>>> with
>>> \includegraphics[scale=0,75]{Kopie.pdf}
>>> Thanks for a tip.
>>
>> Howdy,
>>
>> There are tools to separate out the individual pages but you will 
>> still not
>> have the right bounding box. You might try to open the Kopie.pdf file 
>> in
>> TeXShop, use the selection tool to select each figure and export that 
>> (I
>> think drag and drop works - make sure you have the preferences set to 
>> .pdf)
>> to the desktop. You can then include each figure separately in the 
>> document.
>
> along with the pdfpages package (which will allow you to select one 
> page at a time), you can use a slight detour through ghostscript to 
> separate the pages into includable graphics with the right bounding 
> box. This requires that the pages only contain what you want (no page 
> numbers &c).


Why take this kind of circuitous route via .eps ?

\includegraphics[page=7,scale=0.75]{Kopie.pdf}
                                ^-------  not a ',' !!!

will give you page 7, using pdfTeX (or pdfLaTeX).
(the page=<num> option is *not* available with TeX+Ghostscript)

This feature is what pdfpages uses, but you can do it yourself,
without loading that package. Make sure you use
     \usepackage{graphicx}
(not the  graphics  package, which will be loaded anyway).


Of course, the Bounding-Box may not be the best, when selecting
the whole page this way. So use also the "viewport" option:
e.g.

\includegraphics[scale=0.75,page=7,viewport= 30 520 70 
650,clip]{Kopie.pdf}
                    bottom-left --------------^^^^^^ ^^^^^^----- 
top-right

That "clip" option is *vital*.


Play with the numbers until it is correct for one page of your
document. If all pages are consistent, then you are smiling.
(You can do this with  pdfpages too.)

Maybe some pages are different from others; then make the
required adjustments for those pages only.


Sure, this doesn't have the elegance of being fully automated,
but it's a straight-forward method which is easy to understand
and it obviously adapts to other situations.

Besides, there may be parts of the page (e.g. fancy borders,
background fills, etc.) that you want to remove. Automatic
detection of the Bounding-Box will not be able to do that.


>
> 1) translate the pages into eps with the right bounding box:
>
> gs -dNOPAUSE -dBATCH -sDEVICE=epswrite -sOutputFile=Kopie-%d.eps 
> Kopie.pdf
>

Hope this helps,

	Ross


------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------

-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list