* Trim blank space of a PDF page @ 2018-05-22 13:25 Procházka Lukáš Ing. 2018-05-23 9:11 ` Henri Menke 0 siblings, 1 reply; 6+ messages in thread From: Procházka Lukáš Ing. @ 2018-05-22 13:25 UTC (permalink / raw) To: ConTeXt Hello, just curious - is threre a way how to crop a page of a PDF via ConTeXt? Ideally - to process a single page PDF into another file, with the one page cropped... Best regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Trim blank space of a PDF page 2018-05-22 13:25 Trim blank space of a PDF page Procházka Lukáš Ing. @ 2018-05-23 9:11 ` Henri Menke 2018-05-23 9:25 ` Taco Hoekwater 0 siblings, 1 reply; 6+ messages in thread From: Henri Menke @ 2018-05-23 9:11 UTC (permalink / raw) To: ntg-context On 05/23/2018 01:25 AM, Procházka Lukáš Ing. wrote: > Hello, > > just curious - is threre a way how to crop a page of a PDF via ConTeXt? > > Ideally - to process a single page PDF into another file, with the one > page cropped... It's not really clear what you want. Are you looking for \start...\stopTEXpage? > > Best regards, > > Lukas > > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Trim blank space of a PDF page 2018-05-23 9:11 ` Henri Menke @ 2018-05-23 9:25 ` Taco Hoekwater 2018-05-23 10:09 ` Hans Hagen 0 siblings, 1 reply; 6+ messages in thread From: Taco Hoekwater @ 2018-05-23 9:25 UTC (permalink / raw) To: mailing list for ConTeXt users > > On 05/23/2018 01:25 AM, Procházka Lukáš Ing. wrote: >> Hello, >> >> just curious - is threre a way how to crop a page of a PDF via ConTeXt? >> >> Ideally - to process a single page PDF into another file, with the one >> page cropped... > The ‘pdfcrop’ command from TeXLive can do that for you on the command line. It is based around ghostscript which can automatically find the crop area, then uses pdftex,luatex,or xetex to create a new pdf. It is doable to come up with a solution in ConTeXt if you do not mind specifying the cropbox manually, but automatic cropping is probably too hard for ConTeXt itself (and likely would end up duplicating pdfcrop to some extent). Best wishes, Taco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Trim blank space of a PDF page 2018-05-23 9:25 ` Taco Hoekwater @ 2018-05-23 10:09 ` Hans Hagen 2018-05-23 14:44 ` Alan Braslau 0 siblings, 1 reply; 6+ messages in thread From: Hans Hagen @ 2018-05-23 10:09 UTC (permalink / raw) To: mailing list for ConTeXt users On 5/23/2018 11:25 AM, Taco Hoekwater wrote: > >> >> On 05/23/2018 01:25 AM, Procházka Lukáš Ing. wrote: >>> Hello, >>> >>> just curious - is threre a way how to crop a page of a PDF via ConTeXt? >>> >>> Ideally - to process a single page PDF into another file, with the one >>> page cropped... >> > > The ‘pdfcrop’ command from TeXLive can do that for you on the command line. > It is based around ghostscript which can automatically find the crop area, > then uses pdftex,luatex,or xetex to create a new pdf. > > It is doable to come up with a solution in ConTeXt if you do not mind > specifying the cropbox manually, but automatic cropping is probably too > hard for ConTeXt itself (and likely would end up duplicating pdfcrop > to some extent). there is a script pdftrimwhite.pl in the distribution Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Trim blank space of a PDF page 2018-05-23 10:09 ` Hans Hagen @ 2018-05-23 14:44 ` Alan Braslau 2018-05-23 15:10 ` Taco Hoekwater 0 siblings, 1 reply; 6+ messages in thread From: Alan Braslau @ 2018-05-23 14:44 UTC (permalink / raw) To: Hans Hagen; +Cc: mailing list for ConTeXt users Do these tools work vectorally, that is identify the drawing extent and adjust the boundingbox appropriately, or do they (especially gs) convert to an image and then crop? I use MP to read the pdf and then crop, but to a fixed closed path. The problem here appears to seek an autocrop. Alan On Wed, 23 May 2018 12:09:29 +0200 Hans Hagen <j.hagen@xs4all.nl> wrote: > On 5/23/2018 11:25 AM, Taco Hoekwater wrote: > > > >> > >> On 05/23/2018 01:25 AM, Procházka Lukáš Ing. wrote: > >>> Hello, > >>> > >>> just curious - is threre a way how to crop a page of a PDF via > >>> ConTeXt? > >>> > >>> Ideally - to process a single page PDF into another file, with > >>> the one page cropped... > >> > > > > The ‘pdfcrop’ command from TeXLive can do that for you on the > > command line. It is based around ghostscript which can > > automatically find the crop area, then uses pdftex,luatex,or xetex > > to create a new pdf. > > > > It is doable to come up with a solution in ConTeXt if you do not > > mind specifying the cropbox manually, but automatic cropping is > > probably too hard for ConTeXt itself (and likely would end up > > duplicating pdfcrop to some extent). > there is a script > > pdftrimwhite.pl > > in the distribution > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an > entry to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context webpage : > http://www.pragma-ade.nl / http://context.aanhet.net archive : > https://bitbucket.org/phg/context-mirror/commits/ wiki : > http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Trim blank space of a PDF page 2018-05-23 14:44 ` Alan Braslau @ 2018-05-23 15:10 ` Taco Hoekwater 0 siblings, 0 replies; 6+ messages in thread From: Taco Hoekwater @ 2018-05-23 15:10 UTC (permalink / raw) To: mailing list for ConTeXt users > On 23 May 2018, at 16:44, Alan Braslau <braslau.list@comcast.net> wrote: > > Do these tools work vectorally, that is identify the drawing extent > and adjust the boundingbox appropriately, or do they (especially gs) > convert to an image and then crop? in pdfcrop, gs computes a boundingbox based on (one assumes) its internal image representation. Then it creates a /CropBox that is then read by the pdfcrop perl script to create occlusion margins for an external image include in a plain tex document. I assume pdftrimwhite does the same. That was what you wanted to know, right? Not the nitty gritty of gs’ internal calculations? Taco > > I use MP to read the pdf and then crop, but to a fixed closed path. > The problem here appears to seek an autocrop. > > Alan > > On Wed, 23 May 2018 12:09:29 +0200 > Hans Hagen <j.hagen@xs4all.nl> wrote: > >> On 5/23/2018 11:25 AM, Taco Hoekwater wrote: >>> >>>> >>>> On 05/23/2018 01:25 AM, Procházka Lukáš Ing. wrote: >>>>> Hello, >>>>> >>>>> just curious - is threre a way how to crop a page of a PDF via >>>>> ConTeXt? >>>>> >>>>> Ideally - to process a single page PDF into another file, with >>>>> the one page cropped... >>>> >>> >>> The ‘pdfcrop’ command from TeXLive can do that for you on the >>> command line. It is based around ghostscript which can >>> automatically find the crop area, then uses pdftex,luatex,or xetex >>> to create a new pdf. >>> >>> It is doable to come up with a solution in ConTeXt if you do not >>> mind specifying the cropbox manually, but automatic cropping is >>> probably too hard for ConTeXt itself (and likely would end up >>> duplicating pdfcrop to some extent). >> there is a script >> >> pdftrimwhite.pl >> >> in the distribution >> >> Hans >> >> ----------------------------------------------------------------- >> Hans Hagen | PRAGMA ADE >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >> ----------------------------------------------------------------- >> ___________________________________________________________________________________ >> If your question is of interest to others as well, please add an >> entry to the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context webpage : >> http://www.pragma-ade.nl / http://context.aanhet.net archive : >> https://bitbucket.org/phg/context-mirror/commits/ wiki : >> http://contextgarden.net >> ___________________________________________________________________________________ > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ Taco Hoekwater Elvenkind BV ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-05-23 15:10 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-05-22 13:25 Trim blank space of a PDF page Procházka Lukáš Ing. 2018-05-23 9:11 ` Henri Menke 2018-05-23 9:25 ` Taco Hoekwater 2018-05-23 10:09 ` Hans Hagen 2018-05-23 14:44 ` Alan Braslau 2018-05-23 15:10 ` Taco Hoekwater
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).