ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* splitting a pdf into multiple volumes
@ 2006-07-19 12:29 Ralf Schmitt
  2006-07-19 15:06 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Schmitt @ 2006-07-19 12:29 UTC (permalink / raw)


Hi all,

I'm trying to split a large document for printing to multiple volumes/books.
The first volume should contain a table of contents (but no index/list 
of figures), the second volume should have consecutive pagenumbers, and 
the last volume should contain an index and the list of figures of all 
books. Is this possible with context?

TIA,

- Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: splitting a pdf into multiple volumes
  2006-07-19 12:29 splitting a pdf into multiple volumes Ralf Schmitt
@ 2006-07-19 15:06 ` Taco Hoekwater
  2006-07-19 15:20   ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2006-07-19 15:06 UTC (permalink / raw)




Ralf Schmitt wrote:
> Hi all,
> 
> I'm trying to split a large document for printing to multiple volumes/books.
> The first volume should contain a table of contents (but no index/list 
> of figures), the second volume should have consecutive pagenumbers, and 
> the last volume should contain an index and the list of figures of all 
> books. Is this possible with context?

My approach would be to build the 'big one', then use something like

   % this is split-toc.tex
   \starttext
   \insertpages[complete.pdf][1,3]
   \stoptext

to lift bits and pieces into separate files. Is something like that 
feasible?

Greetings,
Taco

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: splitting a pdf into multiple volumes
  2006-07-19 15:06 ` Taco Hoekwater
@ 2006-07-19 15:20   ` Hans Hagen
  2006-07-19 19:05     ` Ralf Schmitt
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2006-07-19 15:20 UTC (permalink / raw)


Taco Hoekwater wrote:
> Ralf Schmitt wrote:
>   
>> Hi all,
>>
>> I'm trying to split a large document for printing to multiple volumes/books.
>> The first volume should contain a table of contents (but no index/list 
>> of figures), the second volume should have consecutive pagenumbers, and 
>> the last volume should contain an index and the list of figures of all 
>> books. Is this possible with context?
>>     
>
> My approach would be to build the 'big one', then use something like
>
>    % this is split-toc.tex
>    \starttext
>    \insertpages[complete.pdf][1,3]
>    \stoptext
>
> to lift bits and pieces into separate files. Is something like that 
> feasible?
>   
there is also 

texexec --pdfselect --selection=1:10 yourfile.pdf --result=anotherfile

or so 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: splitting a pdf into multiple volumes
  2006-07-19 15:20   ` Hans Hagen
@ 2006-07-19 19:05     ` Ralf Schmitt
  2006-07-19 19:53       ` Peter Münster
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Schmitt @ 2006-07-19 19:05 UTC (permalink / raw)


Hans Hagen wrote:
> Taco Hoekwater wrote:
>> Ralf Schmitt wrote:
>>   
>>> Hi all,
>>>
>>> I'm trying to split a large document for printing to multiple volumes/books.
>>> The first volume should contain a table of contents (but no index/list 
>>> of figures), the second volume should have consecutive pagenumbers, and 
>>> the last volume should contain an index and the list of figures of all 
>>> books. Is this possible with context?
>>>     
>> My approach would be to build the 'big one', then use something like
>>
>>    % this is split-toc.tex
>>    \starttext
>>    \insertpages[complete.pdf][1,3]
>>    \stoptext
>>
>> to lift bits and pieces into separate files. Is something like that 
>> feasible?
>>   
> there is also 
> 
> texexec --pdfselect --selection=1:10 yourfile.pdf --result=anotherfile

That would work. The problem I have is that I don't know where to split 
the pdf file (but I know where to split the context file).

The input file looks like
\input art1
\input art2
...
\input art_n
\page[YES]
% split book here
\input art_n+1
...

I just don't know how to get the pagenumber in the pdf file after the 
\page[YES] command.  If there was a way to have the actual pagenumber 
printed to some log file (or stdout), I already would be happy.
Sorry if I haven't been clear in my previous post.

BTW - if you don't mind some commercial advertising - we're using 
context to generate books from wikipedia articles in our new service 
pediapress (http://pediapress.com). We currently don't have a 'credits' 
page, but Hans certainly belongs there. Thanks for your great work and 
support on the mailing list.

- Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: splitting a pdf into multiple volumes
  2006-07-19 19:05     ` Ralf Schmitt
@ 2006-07-19 19:53       ` Peter Münster
  2006-07-19 20:33         ` Ralf Schmitt
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Münster @ 2006-07-19 19:53 UTC (permalink / raw)


On Wed, 19 Jul 2006, Ralf Schmitt wrote:

> > texexec --pdfselect --selection=1:10 yourfile.pdf --result=anotherfile
> 
> That would work. The problem I have is that I don't know where to split 
> the pdf file (but I know where to split the context file).

If you know about make, you could write a nice Makefile, that takes as
input a temporary file generated by ConTeXt.
Example for generating such a file:

\newwrite\myTmpFile
\openout\myTmpFile \jobname-pages.tmp
\starttext
\dorecurse{6}{\chapter{bla}}
\page\write\myTmpFile{chapter7=\currentpage}
\dorecurse{6}{\chapter{bla}}
\page\write\myTmpFile{chapter13=\currentpage}
\dorecurse{6}{\chapter{bla}}
\write\myTmpFile{end=\currentpage}
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: splitting a pdf into multiple volumes
  2006-07-19 19:53       ` Peter Münster
@ 2006-07-19 20:33         ` Ralf Schmitt
  0 siblings, 0 replies; 6+ messages in thread
From: Ralf Schmitt @ 2006-07-19 20:33 UTC (permalink / raw)


Peter Münster wrote:
> On Wed, 19 Jul 2006, Ralf Schmitt wrote:
> 
>>> texexec --pdfselect --selection=1:10 yourfile.pdf --result=anotherfile
>> That would work. The problem I have is that I don't know where to split 
>> the pdf file (but I know where to split the context file).
> 
> If you know about make, you could write a nice Makefile, that takes as
> input a temporary file generated by ConTeXt.
> Example for generating such a file:
> 
> \newwrite\myTmpFile
> \openout\myTmpFile \jobname-pages.tmp
> \starttext
> \dorecurse{6}{\chapter{bla}}
> \page\write\myTmpFile{chapter7=\currentpage}
> \dorecurse{6}{\chapter{bla}}
> \page\write\myTmpFile{chapter13=\currentpage}
> \dorecurse{6}{\chapter{bla}}
> \write\myTmpFile{end=\currentpage}
> \stoptext

Fantastic, that's exactly what I need.

Many thanks,
- Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-07-19 20:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-19 12:29 splitting a pdf into multiple volumes Ralf Schmitt
2006-07-19 15:06 ` Taco Hoekwater
2006-07-19 15:20   ` Hans Hagen
2006-07-19 19:05     ` Ralf Schmitt
2006-07-19 19:53       ` Peter Münster
2006-07-19 20:33         ` Ralf Schmitt

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).