ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Showing parts of PDF files or splitting PDF files
@ 2002-10-26 14:09 Matthias Heidbrink
  2002-10-26 17:40 ` John Culleton
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Matthias Heidbrink @ 2002-10-26 14:09 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Showing parts of PDF files or splitting PDF files
  2002-10-26 14:09 Showing parts of PDF files or splitting PDF files Matthias Heidbrink
@ 2002-10-26 17:40 ` John Culleton
  2002-10-26 17:43 ` Henning Hraban Ramm
  2002-10-26 20:34 ` Jens-Uwe Morawski
  2 siblings, 0 replies; 5+ messages in thread
From: John Culleton @ 2002-10-26 17:40 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Showing parts of PDF files or splitting PDF files
  2002-10-26 14:09 Showing parts of PDF files or splitting PDF files Matthias Heidbrink
  2002-10-26 17:40 ` John Culleton
@ 2002-10-26 17:43 ` Henning Hraban Ramm
  2002-10-26 20:34 ` Jens-Uwe Morawski
  2 siblings, 0 replies; 5+ messages in thread
From: Henning Hraban Ramm @ 2002-10-26 17:43 UTC (permalink / raw)


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/
---

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Showing parts of PDF files or splitting PDF files
  2002-10-26 14:09 Showing parts of PDF files or splitting PDF files Matthias Heidbrink
  2002-10-26 17:40 ` John Culleton
  2002-10-26 17:43 ` Henning Hraban Ramm
@ 2002-10-26 20:34 ` Jens-Uwe Morawski
  2002-10-27 11:49   ` Hans Hagen
  2 siblings, 1 reply; 5+ messages in thread
From: Jens-Uwe Morawski @ 2002-10-26 20:34 UTC (permalink / raw)


On Sat, 26 Oct 2002 16:09:30 +0200
Matthias Heidbrink <mh@cs.tu-berlin.de> 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?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Showing parts of PDF files or splitting PDF files
  2002-10-26 20:34 ` Jens-Uwe Morawski
@ 2002-10-27 11:49   ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2002-10-27 11:49 UTC (permalink / raw)
  Cc: ConTeXt

At 10:34 PM 10/26/2002 +0200, Jens-Uwe Morawski wrote:
>On Sat, 26 Oct 2002 16:09:30 +0200
>Matthias Heidbrink <mh@cs.tu-berlin.de> 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
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-10-27 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-26 14:09 Showing parts of PDF files or splitting PDF files Matthias Heidbrink
2002-10-26 17:40 ` John Culleton
2002-10-26 17:43 ` Henning Hraban Ramm
2002-10-26 20:34 ` Jens-Uwe Morawski
2002-10-27 11:49   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).