From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: including pdf
Date: Wed, 2 Feb 2011 11:37:47 -0500 (EST) [thread overview]
Message-ID: <alpine.LNX.2.01.1102021116230.7551@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <0591EEE8-0386-4DA9-93E1-EFCAD012B3F5@di.unito.it>
On Wed, 2 Feb 2011, Andrea Valle wrote:
> Ok, let's reformulate partially
>
> If I have:
>
> \setuppapersize[A4]
>
> \setuppagenumbering[location=left, state=start]
>
> \starttext
>
> \copypages[pdf/Test.pdf][scale=1000]
>
> \stoptext
>
> Looking at the resulting pdf, it seems that the original pdf is mirrored
> (apart from half a line at the bottom of the paper, trunked).
> Ok. But there are not page numbers (I guess they are coverd by the imported
> pdf)
You can add a layer on top and set page numbers in the layer.
> Now, so sum up my problem is:
> - given a certain number of A4 pdf
> - how to collect them in a unique pdf
> - with successive page numbers
> - and with refs, so that I can automagically create a TOC
For a quick solution, you can try the cut-n-paste module[1]. It does not
create a TOC, so you will have to do that by hand (or a helper macro).
\usemodule[cut-n-paste]
\newcount\colledpages
\definecutNpaste[collection][n=1,text={\setups[page]},location=(OverlayWidth/2,1cm)]
\startsetups[page]
\doglobal\increment{\collectedpages}%
\collectedpages
\stopsetups
\starttext
\processcollection[name=paper1.pdf]
\processcollection[name=paper2.pdf]
\processcollection[name=paper3.pdf]
\stoptext
The location of the text is controled by the location key. This can be any
valid metapost coordinate.
The module is actually meant for convert two column pdfs to one column
pdfs (for reading on an ebook device), so it an overkill for just merging
pages. You can however control how many pages to insert, (using start and
stop keys), and draw a grid on the page (grid=yes), and trim the page
(more complicated).
But, as I said earlier, the simplest way is to just insert the page number
in a layer.
Aditya
[1]:https://github.com/adityam/cut-n-paste
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2011-02-02 16:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 14:37 Andrea Valle
2011-02-02 10:46 ` Andrea Valle
2011-02-02 11:03 ` Wolfgang Schuster
2011-02-02 11:23 ` Andrea Valle
2011-02-02 16:37 ` Aditya Mahajan [this message]
2011-02-21 10:47 ` Andrea Valle
2011-02-21 21:20 ` Wolfgang Schuster
2011-02-21 15:54 ` Andrea Valle
2011-02-23 14:29 ` Tom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.01.1102021116230.7551@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).