* including pdf and using the entire page @ 2007-02-04 14:30 Johan Sandblom 2007-02-04 18:31 ` Aditya Mahajan 0 siblings, 1 reply; 3+ messages in thread From: Johan Sandblom @ 2007-02-04 14:30 UTC (permalink / raw) To: mailing list for ConTeXt users In my document I want to include a few published pdf files. I have accomplished this with \chapter{File 1} \copypages[file1.pdf][scale=800] % 20 pages \chapter{File 2} \copypages[file1.pdf][scale=650] % 16 pages However, the included pages obey the layout of the rest of the document, and even if the paper in my document could allow a larger scale, I cannot use it since some part of the included file falls off the page. Is it possible to include pdf files and allow each page to use the entire page (possibly with room left for a page number)? I have tried several versions including using makeup (but that is only one page?), pagefigure (also only one page at a time). Regards, Johan -- Johan Sandblom N8, MRC, Karolinska sjh t +46851776108 17176 Stockholm m +46735521477 Sweden "What is wanted is not the will to believe, but the will to find out, which is the exact opposite" - Bertrand Russell ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: including pdf and using the entire page 2007-02-04 14:30 including pdf and using the entire page Johan Sandblom @ 2007-02-04 18:31 ` Aditya Mahajan 2007-02-04 19:06 ` Johan Sandblom 0 siblings, 1 reply; 3+ messages in thread From: Aditya Mahajan @ 2007-02-04 18:31 UTC (permalink / raw) To: mailing list for ConTeXt users On Sun, 4 Feb 2007, Johan Sandblom wrote: > In my document I want to include a few published pdf files. I have > accomplished this with > > \chapter{File 1} > \copypages[file1.pdf][scale=800] % 20 pages > \chapter{File 2} > \copypages[file1.pdf][scale=650] % 16 pages > > However, the included pages obey the layout of the rest of the > document, and even if the paper in my document could allow a larger > scale, I cannot use it since some part of the included file falls off > the page. Try without any value for scale, that is just \copypages[file1.pdf]. > Is it possible to include pdf files and allow each page to use the > entire page (possibly with room left for a page number)? See below. > I have tried several versions including using makeup (but that is only > one page?), pagefigure (also only one page at a time). Basically you need to find out the number of pages of the file and then recursively include them one by one. Recently, I wanted to print a collection of papers as a single pdf, with its own table of contents etc. The trouble was that some of the papers were printed on A4 paper and some were on letter paper. So, I modified the copypages macro to suit my needs. There is very little configuration options for the macro, it behaves the way I wanted it to. Maybe, you can modify it to your needs. \unprotect %D Usage \copyfullpages[filename.pdf] \def\copyfullpages {\dodoubleempty\docopyfullpages} \def\docopyfullpages[#1][#2]% {\bgroup \getfiguredimensions[#1]% \getparameters[\??ip] [\c!n=\noffigurepages, \c!marking=\v!off, \c!scale=\!!thousand, \c!offset=\!!zeropoint, #2]% \dorecurse\@@ipn {\startTEXpage[\c!width=\paperwidth,\c!height=\paperheight,\c!offset=\@@ipoffset] \externalfigure [#1] [\c!page=\recurselevel,\c!width=\paperwidth,\c!height=\paperheight,\c!factor=\v!max,#2] \stopTEXpage \incrementnumber[page]} \egroup} \protect For page numbers, I had a separate layer, which printed on top of the included pdfs (some pdfs were scanned images). I can send you my module if you want. Aditya ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: including pdf and using the entire page 2007-02-04 18:31 ` Aditya Mahajan @ 2007-02-04 19:06 ` Johan Sandblom 0 siblings, 0 replies; 3+ messages in thread From: Johan Sandblom @ 2007-02-04 19:06 UTC (permalink / raw) To: mailing list for ConTeXt users Thank you, now I have something to play with! And yes, please, I would very much like to look at you module. Johan 2007/2/4, Aditya Mahajan <adityam@umich.edu>: > On Sun, 4 Feb 2007, Johan Sandblom wrote: > > > In my document I want to include a few published pdf files. I have > > accomplished this with > > > > \chapter{File 1} > > \copypages[file1.pdf][scale=800] % 20 pages > > \chapter{File 2} > > \copypages[file1.pdf][scale=650] % 16 pages > > > > However, the included pages obey the layout of the rest of the > > document, and even if the paper in my document could allow a larger > > scale, I cannot use it since some part of the included file falls off > > the page. > > Try without any value for scale, that is just \copypages[file1.pdf]. > > > > Is it possible to include pdf files and allow each page to use the > > entire page (possibly with room left for a page number)? > > See below. > > > I have tried several versions including using makeup (but that is only > > one page?), pagefigure (also only one page at a time). > > Basically you need to find out the number of pages of the file and > then recursively include them one by one. > > Recently, I wanted to print a collection of papers as a single pdf, > with its own table of contents etc. The trouble was that some of the > papers were printed on A4 paper and some were on letter paper. So, I > modified the copypages macro to suit my needs. There is very little > configuration options for the macro, it behaves the way I wanted it > to. Maybe, you can modify it to your needs. > > \unprotect > > %D Usage \copyfullpages[filename.pdf] > > \def\copyfullpages > {\dodoubleempty\docopyfullpages} > > \def\docopyfullpages[#1][#2]% > {\bgroup > \getfiguredimensions[#1]% > \getparameters[\??ip] > [\c!n=\noffigurepages, > \c!marking=\v!off, > \c!scale=\!!thousand, > \c!offset=\!!zeropoint, > #2]% > \dorecurse\@@ipn > > {\startTEXpage[\c!width=\paperwidth,\c!height=\paperheight,\c!offset=\@@ipoffset] > \externalfigure > [#1] > > [\c!page=\recurselevel,\c!width=\paperwidth,\c!height=\paperheight,\c!factor=\v!max,#2] > \stopTEXpage > \incrementnumber[page]} > \egroup} > > \protect > > For page numbers, I had a separate layer, which printed on top of the > included pdfs (some pdfs were scanned images). I can send you my > module if you want. > > Aditya > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- Johan Sandblom N8, MRC, Karolinska sjh t +46851776108 17176 Stockholm m +46735521477 Sweden "What is wanted is not the will to believe, but the will to find out, which is the exact opposite" - Bertrand Russell ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-04 19:06 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-02-04 14:30 including pdf and using the entire page Johan Sandblom 2007-02-04 18:31 ` Aditya Mahajan 2007-02-04 19:06 ` Johan Sandblom
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).