* scale A4 pdf with surrounding box @ 2002-07-22 14:35 Ron van Ostayen 2002-07-22 17:22 ` Hans Hagen 0 siblings, 1 reply; 5+ messages in thread From: Ron van Ostayen @ 2002-07-22 14:35 UTC (permalink / raw) Could you please help me to copy a a4-pdf file to a 80% scaled version on a4, but with each page surrounded by a box. texexec --pdfcopy --scale 0.8 --markings file.pdf produces almost what I want, but instead of cutmarks I would like a box surrounding the scaled page. I assume there is something I can change in the produced "texexex.tex" file to obtain the desired result? Thanks for any help, Ron van Ostayen ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scale A4 pdf with surrounding box 2002-07-22 14:35 scale A4 pdf with surrounding box Ron van Ostayen @ 2002-07-22 17:22 ` Hans Hagen 2002-07-22 19:04 ` Ron van Ostayen 0 siblings, 1 reply; 5+ messages in thread From: Hans Hagen @ 2002-07-22 17:22 UTC (permalink / raw) Cc: ntg-context At 04:35 PM 7/22/2002 +0200, you wrote: >Could you please help me to copy a a4-pdf file to a 80% scaled version on >a4, but with each page surrounded by a box. > >texexec --pdfcopy --scale 0.8 --markings file.pdf > >produces almost what I want, but instead of cutmarks I would like a box >surrounding the scaled page. >I assume there is something I can change in the produced "texexex.tex" >file to obtain the desired result? > >Thanks for any help, you can try to add something: \setupbackgrounds[text][frame=on] ------------------------------------------------------------------------- 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
* Re: scale A4 pdf with surrounding box 2002-07-22 17:22 ` Hans Hagen @ 2002-07-22 19:04 ` Ron van Ostayen 2002-07-22 19:57 ` Hans Hagen 0 siblings, 1 reply; 5+ messages in thread From: Ron van Ostayen @ 2002-07-22 19:04 UTC (permalink / raw) Cc: ntg-context Hans Hagen wrote: > At 04:35 PM 7/22/2002 +0200, you wrote: > >> Could you please help me to copy a a4-pdf file to a 80% scaled version >> on a4, but with each page surrounded by a box. >> >> texexec --pdfcopy --scale 0.8 --markings file.pdf >> >> produces almost what I want, but instead of cutmarks I would like a >> box surrounding the scaled page. >> I assume there is something I can change in the produced "texexex.tex" >> file to obtain the desired result? >> >> Thanks for any help, > > > you can try to add something: > > \setupbackgrounds[text][frame=on] > Thanks Hans, After some experimenting I got this to work. However, I have to use a two-step approach. 1) Copy the original pdf file to a pdf file with a frame around the paper. 1a) texexec --pdfcopy file.pdf --result _temp_.pdf 1b) edit the resulting texexec.tex and add \setupbackgrounds[text][frame=on] 1c) texexec texexec.tex --result _temp_.pdf 2) Then scale the temporary pdf file 1c) texexec --pdfcopy _temp_.pdf --scale 0.8 --result file_out.pdf This works ok, but there must be a one-step approach I could use? Ron van Ostayen ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scale A4 pdf with surrounding box 2002-07-22 19:04 ` Ron van Ostayen @ 2002-07-22 19:57 ` Hans Hagen 2002-07-22 21:24 ` Ron van Ostayen 0 siblings, 1 reply; 5+ messages in thread From: Hans Hagen @ 2002-07-22 19:57 UTC (permalink / raw) Cc: ntg-context At 09:04 PM 7/22/2002 +0200, Ron van Ostayen wrote: >Hans Hagen wrote: > >>At 04:35 PM 7/22/2002 +0200, you wrote: >> >>>Could you please help me to copy a a4-pdf file to a 80% scaled version >>>on a4, but with each page surrounded by a box. >>> >>>texexec --pdfcopy --scale 0.8 --markings file.pdf >>> >>>produces almost what I want, but instead of cutmarks I would like a box >>>surrounding the scaled page. >>>I assume there is something I can change in the produced "texexex.tex" >>>file to obtain the desired result? >>> >>>Thanks for any help, >> >>you can try to add something: >>\setupbackgrounds[text][frame=on] > > >Thanks Hans, > >After some experimenting I got this to work. >However, I have to use a two-step approach. > > >1) Copy the original pdf file to a pdf file with a frame around the paper. > 1a) texexec --pdfcopy file.pdf --result _temp_.pdf > 1b) edit the resulting texexec.tex and add > \setupbackgrounds[text][frame=on] > 1c) texexec texexec.tex --result _temp_.pdf > >2) Then scale the temporary pdf file > 1c) texexec --pdfcopy _temp_.pdf --scale 0.8 --result file_out.pdf > >This works ok, but there must be a one-step approach I could use? - copy the texexec.tex file to t-myfile.tex - replace the filename in there by \jobfilename - then run texexec as follows: texexec --use=myfile filename.tex simple example: ======== u-myfile.tex ========== \starttext filename: \jobfilename % uncomment this line as example : \input \jobfilename \stoptext ================================ now run : texexec --use=myfile tufte.tex and see what happens 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
* Re: scale A4 pdf with surrounding box 2002-07-22 19:57 ` Hans Hagen @ 2002-07-22 21:24 ` Ron van Ostayen 0 siblings, 0 replies; 5+ messages in thread From: Ron van Ostayen @ 2002-07-22 21:24 UTC (permalink / raw) Cc: ntg-context > > - copy the texexec.tex file to t-myfile.tex > > - replace the filename in there by \jobfilename > > - then run texexec as follows: texexec --use=myfile filename.tex > > simple example: > > ======== u-myfile.tex ========== > > \starttext > > filename: \jobfilename > > % uncomment this line as example : \input \jobfilename > > \stoptext > > ================================ > > now run : texexec --use=myfile tufte.tex > > and see what happens > I've tried this, but no luck :-( The problem is, I think, the fact that I start with a pdf-file (input.pdf), run it through a modified pdfcopy to frame the pages (framed.pdf), then run it through pdfcopy to scale it (output.pdf). texexec --once --pdf t-frame --result=framed.pdf texexec --once --pdf t-scale --result=output.pdf I don't know how to apply your suggestion to my files. In my case the \jobfilename would be a pdf-file (input.pdf)? texexec --use=scale t-frame with framed.pdf in t-scale.tex replaced by \jobfilename. This fails with no figure t-frame found error. But anyhow, it must be possible to scale and frame in one go? BTW, now we're spending time fixing things that aren't really broken. Your first suggestion to add \setupbackgrounds[text][frame=on] gave me enough info to produce a scaled and framed result. But I'm still trying to learn ConTeXt, and I'm curious how to solve this problem in 1 context-file instead of 2. Ron van Ostayen ===== t-frame.tex ====== % format=english \getfiguredimensions [input.pdf][page=1] \definepapersize [copy] [width=\naturalfigurewidth, height=\naturalfigureheight] \setuppapersize [copy][copy] \setuplayout [location=middle, topspace=0pt, backspace=0pt, header=0pt, footer=0pt, width=middle, height=middle] \setupexternalfigures [directory=] \setupbackgrounds[text][frame=on] \starttext \copypages [input.pdf] [scale=1000, offset=0pt] \stoptext ===== t-scale.tex ====== % format=english \getfiguredimensions [framed.pdf][page=1] \definepapersize [copy] [width=\naturalfigurewidth, height=\naturalfigureheight] \setuppapersize [copy][copy] \setuplayout [location=middle, topspace=0pt, backspace=0pt, header=0pt, footer=0pt, width=middle, height=middle] \setupexternalfigures [directory=] \starttext \copypages [framed.pdf] [scale=800, marking=on, offset=0pt] \stoptext ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-07-22 21:24 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-07-22 14:35 scale A4 pdf with surrounding box Ron van Ostayen 2002-07-22 17:22 ` Hans Hagen 2002-07-22 19:04 ` Ron van Ostayen 2002-07-22 19:57 ` Hans Hagen 2002-07-22 21:24 ` Ron van Ostayen
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).