From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/66256 Path: news.gmane.org!not-for-mail From: Andrea Valle Newsgroups: gmane.comp.tex.context Subject: Re: including pdf Date: Mon, 21 Feb 2011 11:47:46 +0100 Message-ID: <19FAB2F9-526E-4EDB-8BD5-049260801C25@di.unito.it> References: <15E9F111-A7A0-448E-A847-4B8C5A18521B@di.unito.it> <968679B4-77CB-47E1-81D9-18F52B223AEA@di.unito.it> <31985C85-0946-4226-B9A3-143906FEF9B3@gmail.com> <0591EEE8-0386-4DA9-93E1-EFCAD012B3F5@di.unito.it> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============1828042731==" X-Trace: dough.gmane.org 1298305254 1308 80.91.229.12 (21 Feb 2011 16:20:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Feb 2011 16:20:54 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 21 17:20:50 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PrYVF-000821-5h for gctc-ntg-context-518@m.gmane.org; Mon, 21 Feb 2011 17:20:49 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6719ACAA38; Mon, 21 Feb 2011 17:20:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aEFuUDCtPqeU; Mon, 21 Feb 2011 17:20:35 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 88C5CCAA0C; Mon, 21 Feb 2011 17:20:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 00727CAA0C for ; Mon, 21 Feb 2011 17:20:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8AhxBBk3aUYY for ; Mon, 21 Feb 2011 17:20:13 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 2253EC9A7C for ; Mon, 21 Feb 2011 17:20:13 +0100 (CET) Original-Received: from pianeta.di.unito.it (pianeta.di.unito.it [130.192.156.1]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p1LGKCko017032 for ; Mon, 21 Feb 2011 17:20:12 +0100 X-MailScanner-From: valle@di.unito.it X-SpamCheck: not spam, SpamAssassin (not cached, score=-13.988, required 3, AWL -11.49, BAYES_00 -2.60, HTML_MESSAGE 0.00, RDNS_NONE 0.10) X-AntiVirus: Email Clean X-dipinfo-MailScanner-ID: p1LAlk7M011492 X-dipinfo-MailScanner-Information: Please contact Department of Computer Science technical staff for more information Original-Received: from pianeta.di.unito.it ([130.192.156.1]) by pianeta.di.unito.it (INFO-DIP) with ESMTP id p1LAlk7M011492 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO AuthenticatedUser=valle ) for ; Mon, 21 Feb 2011 11:47:47 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.936) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=130.192.156.1; country=IT; region=12; city=Turin; latitude=45.0500; longitude=7.6667; http://maps.google.com/maps?q=45.0500,7.6667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06EaEkcGB - 632edcd17ee0 - 20110221 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:66256 Archived-At: --===============1828042731== Content-Type: multipart/alternative; boundary=Apple-Mail-11-3003246 --Apple-Mail-11-3003246 Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Hi Aditya, thanks for your reply and sorry for my late reply, I've been kidnapped =20= by another work... I'd go with the layer solution. But I don't know to insert a layer for each pdf page. Could you please provide some hints? Thanks a lot Best -a- On Feb 2, 2011, at 5:37 PM, Aditya Mahajan wrote: > On Wed, 2 Feb 2011, Andrea Valle wrote: > >> Ok, let's reformulate partially >> >> If I have: >> >> \setuppapersize[A4] >> >> \setuppagenumbering[location=3Dleft, state=3Dstart] >> >> \starttext >> >> \copypages[pdf/Test.pdf][scale=3D1000] >> >> \stoptext >> >> Looking at the resulting pdf, it seems that the original pdf is =20 >> mirrored (apart from half a line at the bottom of the paper, =20 >> trunked). >> Ok. But there are not page numbers (I guess they are coverd by the =20= >> 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 =20= > not create a TOC, so you will have to do that by hand (or a helper =20 > macro). > > \usemodule[cut-n-paste] > > \newcount\colledpages > > \definecutNpaste[collection]=20 > [n=3D1,text=3D{\setups[page]},location=3D(OverlayWidth/2,1cm)] > > \startsetups[page] > \doglobal\increment{\collectedpages}% > \collectedpages > \stopsetups > > \starttext > > \processcollection[name=3Dpaper1.pdf] > \processcollection[name=3Dpaper2.pdf] > \processcollection[name=3Dpaper3.pdf] > > \stoptext > > The location of the text is controled by the location key. This can =20= > be any valid metapost coordinate. > > The module is actually meant for convert two column pdfs to one =20 > column pdfs (for reading on an ebook device), so it an overkill for =20= > just merging pages. You can however control how many pages to =20 > insert, (using start and stop keys), and draw a grid on the page =20 > (grid=3Dyes), and trim the page (more complicated). > > But, as I said earlier, the simplest way is to just insert the page =20= > 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 =20 > 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 > = __________________________________________________________________________= _________ -------------------------------------------------- Andrea Valle -------------------------------------------------- CIRMA - DAMS Universit=E0 degli Studi di Torino --> http://www.cirma.unito.it/andrea/ --> http://www.myspace.com/andreavalle --> http://www.flickr.com/photos/vanderaalle/ --> http://www.youtube.com/user/vanderaalle --> andrea.valle@unito.it -------------------------------------------------- " This is a very complicated case, Maude. You know, a lotta ins, a =20 lotta outs, a lotta what-have-yous." (Jeffrey 'The Dude' Lebowski) --Apple-Mail-11-3003246 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi = Aditya,

thanks for your reply and sorry for my late = reply, I've been kidnapped by another work...
I'd go with the = layer solution.
But I don't know to insert a layer for each = pdf page.
Could you please provide some = hints?

Thanks a = lot

Best

-a-
<= br>


On Feb 2, 2011, at 5:37 = PM, Aditya Mahajan wrote:

On = Wed, 2 Feb 2011, Andrea Valle wrote:

Ok, = let's reformulate partially

If I = have:

\setuppapersize[A4]

\setuppagenumbering[location=3Dleft, = state=3Dstart]

\starttext

\copypages[pdf/Test.pdf][scale=3D1000]

\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=3D1,text=3D{\setups[page]},location=3D(Ove= rlayWidth/2,1cm)]

\startsetups[page]
=  \doglobal\increment{\collectedpages}%
=  \collectedpages
\stopsetups

\starttext

\processcoll= ection[name=3Dpaper1.pdf]
\processcollection[name=3Dpaper2.pdf]
\pro= cesscollection[name=3Dpaper3.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=3Dyes), 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.sup= elec.fr/projects/contextrev/
wiki     : http://contextgarden.net
________= __________________________________________________________________________= _


--------------------------------------= ------------
Andrea = Valle
--------------------------------------------------
CIRMA - DAMS
Universit=E0 degli Studi di = Torino
= --------------------------------------------------
" This is a very complicated case, Maude. = You know, a lotta ins, a lotta outs, a lotta = what-have-yous." 
(Jeffrey = 'The Dude' Lebowski)


=

= --Apple-Mail-11-3003246-- --===============1828042731== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1828042731==--