Skip to main content
Participating Frequently
March 12, 2021
Question

Acrobat Distiller and PostScript file operators

  • March 12, 2021
  • 3 replies
  • 4295 views

As per the Acrobat Distiller API Reference, I'm attempting to launch Distiller to enable the distillation of a PostScript file that is user the restricted operators.

 

I am using a Mac with Acrobat Distiller 2020. I have set the plist AllowPSFileOps to True. On every launch of the distiller, the plist entry is changed to False, and the distillation of a PostScript file that uses file operators fails.

 

I need guidance on how to make this work.

This topic has been closed for replies.

3 replies

jdaw1
Participating Frequently
March 25, 2021

I asked a similar question in http://community.adobe.com/t5/acrobat/distiller-enabling-file-functionality/m-p/11925183

The Postscript `run` command used to execute a file (see PLRM3 p653 in §8.2). Could you replace each instance of a `run` command with the whole file? That might be easy for instances such as `(filename.eps) run`, but will require careful reading if the filename is generated by non-trivial code.

Legend
March 25, 2021

It's also impossible if the run command is used in a procedure, condition or loop. (One of the common "brick walls" for automated processing of PostScript). An alternative technique would be to add each of the to-be-embedded files to the source code as members of a dictionary with each file defined with the SubFileDecode filter, and have run refer to the dictionary items. The limitation here is the fact that all files have to be preloaded into memory; on Windows there's a 2GB address space limit. 

 

Also some PostScript code actually does expect to read and write files, not just execute them. 

Participating Frequently
March 26, 2021

The application emitting the PostScript is an older version of OpenText Exstream (HP  Exstream v 7.0.605). This particular instance uses PostScript 'file' operators to support running totals across multiple pages using PostScript code. It is indeed creating, writing, reading, and deleting an actual RIP based file.

BarlaeDC
Community Expert
Community Expert
March 17, 2021

Hi,

 

Which version of OSX are you using as there may be additional rights that you need to give to distiller, such as  Full Disk Access or Files and Folders.

 

 

Participating Frequently
March 20, 2021

I'm using macOS Mojave (10.14.6). I've tried enabling full disk access, to no available.

 

The distiller's install path is "/Applications/Adobe Acrobat 2020/Acrobat Distiller.app", the default path.

 

I've modified the "~/Library/Preferences/com.adobe.distiller2020.plist" to have the boolean entry "AllowPSFileOps" to be "YES". I've tried locking the plist.

 

I've invoked the distiller from both the GUI and command line. When invoke via the command line, I've tried:

  • Just the path to the executable "/Applications/Adobe Acrobat 2020/Acrobat Distiller.app/Contents/MacOS/Distiller"
  • The executable with the -F option  "/Applications/Adobe Acrobat 2020/Acrobat Distiller.app/Contents/MacOS/Distiller" -F
  • The executable with the -f option  "/Applications/Adobe Acrobat 2020/Acrobat Distiller.app/Contents/MacOS/Distiller" -f
  • The executable with the unix -allowfileops option  "/Applications/Adobe Acrobat 2020/Acrobat Distiller.app/Contents/MacOS/Distiller" -allowfileops

 

I've enabled the root user, modified its com.adobe.distiller2020.plist, and tried all of the above steps. 

 

Nothing above, for either a regular user or for root works, to allow the successful distillation of a file that contains PostScript code using file operators.

 

Any other ideas?

 

-Mark

 

ls_rbls
Community Expert
Community Expert
March 25, 2021

Yes, the PostScript files print fine.

 

This is because the PostScript RIPs implement the 'file' operators. The Distiller can also support the 'file' operators, but since because the 'file' operators could be abused, Adobe changed the default behavior of Distiller to not support these operators.

 

Adobe did allow a method to enable support for 'file' operators, but that doesn't seem to be working as documented. Hence, my reason for this entire thread.

 

-Mark


So I was reading through some of the links that I found, if it would it make any difference to set the Adobe PDF printer as the default printing device instead of the actual physical printing device in that computer.

 

Based on the input / output error that Distiller is throwing when you use the operator -F  and the offending command being "file" (not an " image " or anything else),  I thought  that maybe customizing a profile via GUI using the  Printing Preferences may be a useful workaround.

 

In the pdfmark reference you'll see that the settings that can be set via Printing Preferences, can be customize via command line.

 

There's also a few switches of interest in one of the links above.

 

But these are just ideas. I will try on my MS Windows box and post back if I can find something relevant.

ls_rbls
Community Expert
Community Expert
March 17, 2021

How is the Distiller invoked, via GUI or command terminal? Does it make any difference if you run it with elevated privilege as Administrator?

 

And in which directory path is the Distiller executable installed?

 

Also, are you using as a reference the Acrobat Plist Preference Reference? 

 

It may be possible that this preference is not lockable or it depends on another Plist dependency that also needs to be changed (or created) to retain the value of "true" for the AllowPSFileOps .