Link to home
Start Free TrialLog in
Avatar of crabbear
crabbear

asked on

Error generating PDF file from PS file(s) generated from MS ACCESS (VB6) Form Application

Hi
I'm using acobat pdf and distiller 7.0.
What my program does is to generate data into PS format, before generating it to PDF using distiller.
All these are done in the MS ACCESS (VB6) Form Application.

Error retrieved from log file
D:/APM/APMRPTV3/PS/Scoring2007Q2.PS

%% Warning: "xxxxxx.PS"
%% Caused the following error:

%%[ Error: undefined; OffendingCommand: EP* ]%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%[ Warning: Empty job. No PDF file produced. ] %%

Please help. Thanks
Avatar of crabbear
crabbear

ASKER

By the way..do i need to set my default printer to PDF printer or ADOBE PDF printer?
You can set the desired output filename by setting a registry key (see the Distiller API documentation for details). After that, you just print to the Adobe PDF printer and it should just work. There is no need to set the default printer (as long as you can specify the printer name at the time you want to create the PDF document).

How are you printing right now? Are you creating a PostScript file first?
HI,

Yes, i actually created the postscript files first. It just that i have problem converting to pdf. Both 5.0 and 7.0 are giving me problems.

what does this error means: Error: undefined; OffendingCommand: EP*

And where can I get the API documentation? It would be great if you can provide me the answer over here.

Thanks alot.
All the SDK documentation is available here: http://www.adobe.com/devnet/acrobat/
Go to the Documentation tab and then scroll down to the PDF Creation APIs and download the Acrobat Distiller API Reference (PDF, 237k). Take a look at the bottom of page 15 ("Disable prompts for output file names").

The offending command error means that something that is used in your PS file is not valid in the current PostScript interpreter environment. This can be because the PS was created for a specific printer.

In general, if you want to create PDFs from an application, it's best to void any "real" printer drivers. These are written to create PostScript jobs for real printers. You lose the "portable" in Portable document format by doing that. If you just print to the Adobe PDF printer after you set the filename via the registry, you get a true PDF file. And, you will avoid putting any commands into your PostScript file that the Distiller cannot handle.

However, this will not work with Acrobat 5. The registry key was introduced in Acrobat 6 (undocumented), and documented in Acrobat 7 and later.

How are you creating your PostScript files?
sorry for the late reply. was busy changing codes. i din use the distiller api. coz im using pdf printer, it will convert it directly to pdf rather than use distiller to convert.

problems:
1. it does hang after running a while. why is that so?
2. is there any way to change the paper size to a4? currenly is set to letter. i tried changing..but the paper source still reflecting letter

please help.
ASKER CERTIFIED SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi Khkremer,
Sorry for the late reply. was very busy.
Ignore the 1st part: i used another approach
for the 2nd part : i have set the page size to A4, but when my application tries to convert the data into pdf file, the paper size is set back to letter. not sure why is that so..
I have set the paper size from letter to A4 in device settings tab and printing pref button.

any idea on this ? thanks
Hi i got it solved by changing the report page setup too. thanks