[pdftex] absolute positioning of graphics(pdf's) using pdftex

Hans Hagen pragma at wxs.nl
Mon Mar 19 13:52:56 CET 2001


At 11:09 AM 3/19/01 -0000, David Etherington wrote:
>   Hi again,   I am still looking for a way to absolutely position 
>graphics (pdf's) in a tex document for use with pdftex.   1) I do not
>require any text in the  document 2) I simply want to say:-   page
>height=10in page width=10in   include graphic.pdf @position 4in x  3in  
>include graphic.pdf @position 8in x  7in   /newpage   include graphic.pdf
>@position 4in x  3in     etc   etc   3) I have downloaded MikTeX for
>windows and have  all the extra bits like latex.   4) I am very new to tex
>and to be honest cannot  find help   5) I have had message re bophook but I
>do not know  how to include this, set it up, what its syntax is etc.  
>Please Help.     Thanks. 

just use plain tex: 

\pdfoutput=1

\pdfpagewidth=21cm 
\pdfpageheight=29.7cm 
\hoffset=-1in
\voffset=-1in

\newbox\currentgraphic
\newbox\collectedgraphics

\def\addsomegraphic#1#2#3% file dx dy 
  {\hsize\pdfpagewidth 
   \vsize\pdfpageheight
   \setbox\currentgraphic=\hbox
     {\immediate\pdfximage{#1}\pdfrefximage\pdflastximage}   
   \setbox\collectedgraphics=\vbox to \vsize
     {\offinterlineskip
      \ifvoid\collectedgraphics\else
        \ht\collectedgraphics0pt
        \wd\collectedgraphics0pt
        \box\collectedgraphics
      \fi
      \vskip#3
      \wd\currentgraphic0pt
      \hbox to \hsize{\hskip#2\box\currentgraphic\hss}
      \vss}}

\def\flushgraphics%
  {\shipout\box\collectedgraphics}
    
\addsomegraphic{koe.pdf}{0cm}{0cm}
\flushgraphics

\addsomegraphic{koe.pdf}{3cm}{5cm}
\addsomegraphic{koe.pdf}{4cm}{7cm}
\flushgraphics

\addsomegraphic{koe.pdf}{13cm}{15cm}
\addsomegraphic{koe.pdf}{10cm}{11cm}
\flushgraphics

\end

If there is any real demand for such things ... i can make it nicer 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma at wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------




More information about the pdftex mailing list