Home | Site Map | Site Search
Home > Information >

How to Merge PDF files

Goal: To merge separate PDF files file1.pdf and file2.pdf into one file, file12.pdf with GSview.

[To merge PostScript (.ps) files you can fast forward to PostScript merge part of this document.]

  1. Install GSview to the computer.
  2. Convert file1.pdf and file2.pdf into PostScript (.ps) format. In Adobe Acrobat Reader this can be done with File -> Open.. file1.pdf, File -> Print... -> Select some PostScript printer -> mark Print to file -> OK. Write file1.ps to File name: -> OK.

    Repeat these steps to convert file2.pdf into file2.ps. In this example it is assumed that the files are saved into c:\tilap\ directory.

    It's not necessary to have a PostScript printer. A driver for it can be installed even if there is already some other printer attached to the computer.

  3. Open Notepad (or some other text editor), copy and paste the following PostScript code snippet into an editor. Edit the code to correspond the directory where file1.ps and file2.ps were saved. Remember to to use \\ instead of \ in path names. Save the results to some directory as file12.ps.

    % Written by Helge Blischke, see
    % http://groups.google.com/groups?ic=1&selm=3964A684.49D%40srz-berlin.de
    % The following 2 procs encapsulate the jobs to be processed
    % much as is done with EPS images:
            /tweak_save save def
            /tweak_dc countdictstack def
            /tweak_oc count 1 sub def
            userdict begin
    }bind def
            count tweak_oc sub{pop}repeat
            countdictstack tweak_dc sub{end}repeat
            tweak_save restore
    }bind def
    % Now, add your jobs like this:
    % and so on.
  4. Start GSview to view merged PostScript files. File -> Open... -> file12.ps.

    ...and convert it back to PDF: File -> Convert... -> Device: pdfwrite -> OK -> file12.pdf

This example was done with GSview 3.4 and Adobe Acrobat Reader 4.0 running on Windows 95 OSR 2.

Other alternatives

Home | Software | Information | Etsin | Chinese | Christmas Calendars | Site Info