Skip to main content
Participant
February 14, 2018
Question

Preserving postscript command when converting to PDF - Possible?

  • February 14, 2018
  • 6 replies
  • 701 views

Sorry if this question has been asked before. Need information from the community if my above question is possible. I am not using distiller. The product I'm using is an automation tool where I take user input in the form of a postscript file which my process then converts to PDF to dynamically stamp additional information to each page, once that's done, the data is re-assembled into one contiguous data stream and converted back to a postscript file output. Problem with this is, all the original postscript commands are lost.  Has anybody here done this level of automation before on postscript files while being able to preserve the ps commands?

This topic has been closed for replies.

6 replies

Legend
June 20, 2018

But in PDF, filters and encryption are entirely diffferent concepts. Encryption is applied to all filter and string objects according to the encryption dictionary.  Filters are optional but almost all software now uses compression filters for all nontrivial streams.

Legend
June 18, 2018

Yes, filters certainly. But not encryption. Not at all the same thing...

Inspiring
June 20, 2018

Postscript filters are Adobe procedures to provide Encoding/Decoding of either data or text or font.

and it means compression , some way of Encryption/Decryption depend on the filter   -

It is this way since 1990.

Legend
June 18, 2018

Note: Distiller does not encrypt text unless you choose security, but it may remove content outside the media box.

Inspiring
June 18, 2018

check it up  ;-)  

There is usage of filter o all text within PDF

Inspiring
June 18, 2018

Well  perhaps this might be workaround to preserve the PS commands if they are little

for example if this is your PS commands

200 400 moveto

/Helvetica 13 selectfont

(Hello)  show

Do the following

1- Create new string variable and inser all your PS command as string value , you can create several variables if he PS are many

/MYPScommand  (   200 400 moveto  //Helvetica   13 selectfont  (Hello)  show )  def

2- Print that variable outside the printing page

0 -5 moveto

MYPScommand  show

Ìt didn't work with distiller because text is encrypt within PDF   but might work with other PS-PDF 3PP conversion. where text no compressed and non encrypted.

MilesKilo
Participating Frequently
March 26, 2018

Indeed, there's no way to preserve your PostScript code when round-tripping from PS --> PDF --> PS.

If all you want to do is overlay certain information from a PDF on top of the existing PS, that's a much realistic goal. In that case, there's no need to convert the PS to PDF.

Use InDesign to Place the PS file onto a page of an InDesign document, then overlay whatever your want on top. You can print the result to a PostScript file.There will be a lot of extra InDesign stuff in the output file, but your original PS file will be in there, intact.

If you want absolutely clean output PostScript, you can convert your PDF overlay to PostScript. You'll then need some non-trivial knowledge of PostScript programming to write a script that inserts the PS overlay into the original PS.

Legend
February 16, 2018

What PostScript commands do you want to preserve, and why? It is the job of the PDF workflow to produce graphically equivalent content. There is no way in the world to preserve it textually.