Showing parts of PDF files or splitting PDF files
Hi, I need to include a PDF picture in a ConTeXt document that is much too detailed to be scaled down onto a single page. So I need to distribute it across two ore more pages. - Is there a way to display only a part of a PDF file in ConTeXt, like it could be done with manipulation of the bounding box of a PostScript picture in LaTeX? - Does anyone know an application that will split a PDF file into user-defined parts (not just printing pages)? - Any other ideas? Ciao, Matthias
On Saturday 26 October 2002 10:09 am, Matthias Heidbrink wrote:
Hi,
I need to include a PDF picture in a ConTeXt document that is much too detailed to be scaled down onto a single page. So I need to distribute it across two ore more pages.
- Is there a way to display only a part of a PDF file in ConTeXt, like it could be done with manipulation of the bounding box of a PostScript picture in LaTeX?
- Does anyone know an application that will split a PDF file into user-defined parts (not just printing pages)?
- Any other ideas?
Ciao, Matthias _______________________________________________
I would convert the pdf to ps, load it into gimp, and do what I needed to do there. Then download the results as e.g., giff and include it in Context as a graphic. Or download as ps, convert to pdf etc. John Culleton Able Indexers and Typesetters, Rowse Reviews, Culleton Editorial Services http://wexfordpress.com
Am Samstag, 26. Oktober 2002 16:09 schrieb Matthias Heidbrink:
- Is there a way to display only a part of a PDF file in ConTeXt, like it could be done with manipulation of the bounding box of a PostScript picture in LaTeX?
Don't know. In PS you could use a mask path, similar constructs exist in PDF, but I don't know how to create or manipulate such.
- Does anyone know an application that will split a PDF file into user-defined parts (not just printing pages)?
The simplest way would be to change the crop box and trim box of the page. You can do that with Acrobat (not Reader) and the free "Prinergy Geometry Editor" plugin by Creo. There are other tools (Acrobat plugins, not free) to trim pictures in a PDF to the visual part (Enfocus PitStop, Quite A Box of Tricks, maybe others). You would need two copies with different boxes. But I didn't try yet how ConTeXt / pdfTeX handles boxes in an embedded PDF. Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://www.ramm.ch/context/ ---
On Sat, 26 Oct 2002 16:09:30 +0200
Matthias Heidbrink
I need to include a PDF picture in a ConTeXt document that is much too detailed to be scaled down onto a single page. So I need to distribute it across two ore more pages.
- Is there a way to display only a part of a PDF file in ConTeXt, like it could be done with manipulation of the bounding box of a PostScript picture in LaTeX?
Since LaTeX can do it it for PDFs too, it should be possible in ConTeXt as well. The problem is that there seems to be no option in the \externalfigure macro for this purpose. Hans knows ...
- Does anyone know an application that will split a PDF file into user-defined parts (not just printing pages)?
- Any other ideas?
Maybe the following can help you. (run texexec with option --automp) %%--- snip --- % output=pdftex interface=en \startMPinclusions def SplitExternalFigure (expr _file, _size, _split, _show) = begingroup; save _xp, _yp ; numeric _xp, _yp ; _xp:= (xpart _size)/(xpart _split) ; _yp:= (ypart _size)/(ypart _split) ; externalfigure _file xyscaled _size ; clip currentpicture to ( (unitsquare xyscaled (_xp,_yp)) shifted (((xpart _show)-1)*_xp,((ypart _show)-1)*_yp) ) ; endgroup; enddef; \stopMPinclusions \startuseMPgraphic{mySplitFigure} SplitExternalFigure( "\MPvar{file}", (\MPvar{size}), (\MPvar{hparts},\MPvar{vparts}), (\MPvar{hshow},\MPvar{vshow}) ) ; \stopuseMPgraphic \starttext % file: file name of your graphic % size: horizontal and vertical size of your graphic % hparts, vparts: split graphic horizontally in hparts % columns and vertically in vparts rows % hshow, vshow: shows after splitting segment in column % hshow and row vshow (hshow=1,vshow=1 means most % lower-left segment) \setupMPvariables[mySplitFigure] [file=myfigure.pdf, size={91.9mm,53.7mm}, hparts=3,vparts=2,hshow=1,vshow=1] % place the splitted figure by name \placefigure{splitted: 3by2, shows segment: 1,1} {\useMPgraphic{mySplitFigure}} \setupMPvariables[mySplitFigure] [hparts=2,vparts=2,hshow=2,vshow=1] \placefigure{splitted: 2by2, shows segment: 2,1} {\useMPgraphic{mySplitFigure}} \stoptext %%--- snap --- Have fun, Jens
At 10:34 PM 10/26/2002 +0200, Jens-Uwe Morawski wrote:
On Sat, 26 Oct 2002 16:09:30 +0200 Matthias Heidbrink
wrote: I need to include a PDF picture in a ConTeXt document that is much too detailed to be scaled down onto a single page. So I need to distribute it across two ore more pages.
- Is there a way to display only a part of a PDF file in ConTeXt, like it could be done with manipulation of the bounding box of a PostScript picture in LaTeX?
Since LaTeX can do it it for PDFs too, it should be possible in ConTeXt as well. The problem is that there seems to be no option in the \externalfigure macro for this purpose. Hans knows ...
- Does anyone know an application that will split a PDF file into user-defined parts (not just printing pages)?
- Any other ideas?
there is a clip macro: \clip[nx=2,ny=2,x=1,y=1]{\externalfigure[koe]} \clip[hoffset=1cm,width=2cm,height=3cm]{\externalfigure[koe]} you can also apply arbitrary clipping paths (see metafun manual) \startMPclip{fun} clip currentpicture to fullcircle shifted (.25,.25) xscaled \width yscaled \height ; \stopMPclip \clip[nx=1,ny=1,x=1,y=1,mp=fun]{\externalfigure[koe]} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@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 ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (5)
-
Hans Hagen
-
Henning Hraban Ramm
-
Jens-Uwe Morawski
-
John Culleton
-
Matthias Heidbrink