· data2print ·

The solution for preparing, composing and personalizing
complex printed matter

Startpage · Introduction · Input/Processing/Output · Examples

Rearrange existing PDF documents
PDF document in individual pages
Split PDF document into front pages/back pages
Extract specific PDF pages
Extract specific PDF front/back pages

Composition of multiple PDF documents
Combine PDF documents
Scale PDF document
Duplicate PDF document on print sheet

Change existing PDF documents
Create multi-page mail merge
Resort PDF documents

 

Example – Remove certain PDF front/back pages

Select a PDF file with the mouse and specify a list of page numbers (1,5,74,100-123,150,151). Remove the specified pages (as a matching pair: front and back), e.g. for reprinting or separate color printing of certain pages (duplex printing).

<?xml version="1.0" encoding="utf-8"?>
<job>
  <dialog>
    <topic>
      <prompt>PDF-Inputfile</prompt>
      <type>file</type>
      <filter>'.pdf'</filter>
      <variable>inFile</variable>
    </topic>
    <topic>
      <prompt>Seiten entnehmen (z.B. 1,2,3-10,11,13)</prompt>
      <type>pagenumbers</type>
      <variable>inPages</variable>
    </topic>
  </dialog>

  <instance>
    <eval variable="outFile" expression="filecutending({inFile})+'_extrakt.pdf'" />
    <iterate file="{inputFile}" variable="inPdf">
      <continue condition="({pdfinput.pagenr} mod 2)=0" />
      <if condition="({inPdf.pagenr} isin {inputExtract})
                      or (({inPdf.pagenr}+1) isin {inPages})">
        <append>
          <template file="{inFile}" pagenr="{inPdf.pagenr}"/>
          <output file="{outFile}" />        
        </append>
	<append>
          <template file="{inFile}" pagenr="{inPdf.pagenr}+1"/>
          <output file="{outFile}" />        
        </append>
      </if>
    </iterate>
  </instance>
</job>
 


Open selection window

Description field
Select a file
Only allow PDF files
Remember selected file name


Description input field
Specify page numbers
Remember page numbers as a list




Output file consists of the extended name of the input file
Cycle through all pages of the PDF file
Skip straight pages (later)
Was the current odd page or the even following page specified?


Add the currently odd page



Add the currently following straight page



End of program loop