Skip to main content
Known Participant
January 29, 2016
Question

When merging ps files, some pages are missing

  • January 29, 2016
  • 1 reply
  • 1643 views

Hi,

We are using PS merging option, the below steps we are following to create pdf from set of ps files

1. Merging all the .ps files into single .ps file

2. in Single ps file, path will be changed

3. Creating pdf from the merged single .ps file

but when we open that pdf, some pages are missing. Can anyone know that how to solve it. Is it the proper method. Please advice.

Regards

Jayesh

This topic has been closed for replies.

1 reply

Dov Isaacs
Legend
January 29, 2016

Can we assume that by “PS” you mean PostScript?

For better or worse, you really cannot assume that concatenating PostScript files either to print or to distill into PDF will yield the same results as printing or distilling the PostScript files individually. The ability to do such concatenation really depends on how well the individual PostScript files encapsulate their graphics states and definitions.

         - Dov

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)
Known Participant
January 29, 2016

Yes, .ps means postscript. We are using the below method to distill the .ps to pdf

FOR EXAMPLE

%!
% PostScript program for distilling and combining multiple PostScript files.
% When embedding font subsets, it is highly recommended you use this technique
% to distill multiple PS files so only one font subset is used for each font.

/prun { /mysave save def       % Performs a save before running the PS file
        dup = flush            % Shows name of PS file being run
        RunFile                % Calls built in Distiller procedure
        clear cleardictstack   % Cleans up after PS file
        mysave restore         % Restores save level
} def

(d:/PS-Merge/3376815/9781107039322_pod.ps) prun
(d:/PS-Merge/PS-Merge/3376815/9781107039322c01.ps) prun
(d:/PS-Merge/PS-Merge/3376815/9781107039322c02.ps) prun
(d:/PS-Merge/3376815/9781107039322c03.ps) prun
(d:/PS-Merge/3376815/9781107039322c04.ps) prun
(d:/PS-Merge/3376815/9781107039322c05.ps) prun
(d:/PS-Merge/3376815/9781107039322c06.ps) prun

% INSTRUCTIONS
%
% 1. Locate all PostScript files to be distilled.
%
% 2. Make a copy of this file and give it the name you want to have as the prefix
%    for the resulting file. For example, you could name this file MyBook.ps.
%
% 3. Include a line for each PostScript file to be run using the pathname syntax
%    appropriate for the platform running Acrobat Distiller.
%
%       Macintosh pathname syntax:  (Macintosh HD:Folder:File.ps) prun
%       Windows pathname syntax:    (c:/mydir/file.ps) prun
%       UNIX pathname syntax:       (./mydir/File.ps) prun
%
%       Note: The syntax for Windows may look strange, but double escaping the
%             backslash character is required when using filenameforall.
%
% 4. Distill the file on the machine running Acrobat Distiller.

Dov Isaacs
Legend
January 29, 2016

Great. That is what I thought you were doing. Unfortunately the

/mysave save def      % Performs a save before running the PS file

        dup = flush   % Shows name of PS file being run

        RunFile       % Calls built in Distiller procedure

        clear cleardictstack

does not fully clean everything up between the PostScript fragments.

Assuming that each of your PostScript files define independent pages, you would be much safer by distilling each of the PostScript files individually into PDF files that you can combine together into a single PDF file via Actions or scripting in Acrobat.

         - Dov

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)