[OS X TeX] pdfinfo and calculating in an engine

Friedrich Vosberg fvosberg at mac.com
Wed Mar 21 11:16:10 CET 2007


Morning.

Where can I find pdfinfo for using in a Shell script respectively in  
an engine and how can I calculate in an engine?

The idea is to create a PDF file that includes another PDF twice: One  
without background picture (original), one with COPY (copy) in the  
background. Then it should be printed the »original« in simplex mode  
(one page one sheet) and the »copy« in duplex mode (one sheet two  
pages). Therefore its necessary to check how many pages a PDF file  
contains ...

   pdfinfo $WHOLE_PDF | grep ^Pages | sed 's/Pages:[[:space:]]*//'

... then it must calculate how much is the half of $WHOLE_PDF

   ???

... and then print via ...

   lp -P $FIRST_HALF -t engineprintout.pdf "${basefname}.pdf"

... the first half of them simplex and via ...

   lp -P $SECONF_HALF -t engineprintout.pdf -o sides=two-sided-long- 
edge "${basefname}.pdf"

... the second half in duplex mode.

How can I realize this?

TIA and kind regards, Friedrich

--
Erst wenn die letzte Autobahn begrünt, die letzte Tankstelle  
geschlossen, das letzte Auto stillgelegt ist, werdet Ihr merken, dass  
man bei Greenpeace nachts kein Bier kaufen kann.




--
»The day Microsoft makes something that doesn't suck is probably the  
day they start making vacuum cleaners.« (Ernest Jan Plugge)




------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list