Apache OpenOffice (AOO) Bugzilla – Issue 19824
PDF Export - PDF won't print - Offending Command TZ
Last modified: 2004-02-26 17:13:27 UTC
Problem found on both RC3 on Linux, and RC4 on Windows 2000. I export my Writer document using "Export to PDF...", and it looks great on screen on several different computers. Problem is when I try to print the PDF. Printing PDF (RC3 on Linux) prints this error: ERROR: undefined OFFENDING COMMAND: TZ STACK: -1 /NimbusRomNo9L-Medi /N34 -mark- Printing a completely different PDF (RC4 on Windows 2000) gives following error. In this case I'm printing to Acrobat Distiller and not a real printer. Here is the .log file: %%[ Error: undefined; OffendingCommand: TZ ]%% Stack: -1 /EAAAAA+TimesNewRomanPS-BoldMT /N32 -mark- %%[ Flushing: rest of job (to end-of-file) will be ignored ]%% %%[ Warning: PostScript error. No PDF file produced. ] %%
Created attachment 9507 [details] Original RC4 on Windows 2000 OpenOffice Writer file
Created attachment 9508 [details] Exported to PDF
Created attachment 9509 [details] Error log when printing PDF to Acrobat Distiller. Get a similar error when printing to a real printer as well.
Distiller and your printing system both expect a postscript file and NOT a pdf file. Please use "file->print" to print. You can print the pdf file by loading it into Acrobat Reader and printing from within this application.
I definitely printed my original PDF (created on Linux RC3 using "Export to PDF") from Acrobat Reader (on a Windows machine at Kinkos) and received the original TZ errors. (I may have accidentally printed the text.pdf from OOo in the Windows version when I was trying to submit a small sample with the bug report.)
I just reproduced the problem, and have attached two new files - greek.sxw and OOoX-greek.pdf. OOoX-greek.pdf was created by choosing "Export to PDF" (Linux RC3), then picking the default "print optimized version". I then went to Kinko's, opened up the PDF (in Acrobat Reader 5.0), and printed it. This is the message that printed out: ERROR: undefined OFFENDING COMMAND: TZ STACK: -1 /GAAAAA+OpenSymbol /N9 -mark When I switch to Windows, and create a PDF via printing from OOo to Acrobat Distiller, the final PDF prints fine using the same steps. Also, in all cases, the PDF looks fine on-screen.
Created attachment 9576 [details] RC3 Linux Writer File - used to create OOoX-greek.pdf
Created attachment 9577 [details] PDF that won't print
I was able to print both documents fine with Acrobat reader. Not the slightest problem. If Acrobat is not able to print on your machine but it's able to open the document fine for display then I rather think this is a problem with Acrobat, not with OpenOffice. The problem seems to be related with embedded truetype fonts. So what printer do you use ? is it capable of printing Type42 fonts (embedded TrueType fonts) ? Can you print to file from Acrobat and view the resulting postscript document with GhostScript ?
I tried a few more things to help narrow this down. I'm still voting that this is a OOo issue - just because OOo Exported PDFs on both Win and Linux don't seem to work, while both Acrobat running on Win and Linux seem to have no problem with the Distilled versions. To help narrow down: I created two more versions of the OOo Exported PDF - one with *only* TrueType fonts (created using RC4 on Windows), and one with *only* Type 1 fonts (created on RC3 on Linux). I was hoping one would work and one wouldn't - but instead neither of them worked. The printer used is the Xerox DocuPrint N4525. Also, I created .ps files on Windows using HP IIIsi PS v52.3 for both the Distilled PDF and the OOo Exported PDF. I then opened the .ps files in Acrobat (5 on Windows) in Distiller, and the OOo errored out when trying to convert to PDF. I'm running out of ideas on my end to narrow this down further. I assume you're able to walk though the Distiller PDF and the OOo PDF and see if anything looks odd? (I'll submit the Distiller-create PDF)
Created attachment 9614 [details] greek.sxw printed to Acrobat Distiller print driver. File prints ok.
Created attachment 9615 [details] greek.sxw with only Type 1 fonts (created on Linux). Doesn't print successfully.
Created attachment 9616 [details] greek.sxw with only TrueType fonts (created on Windows). Doesn't print successfully.
I can print the documents quite fine with Acroread 5 on Sparc, with Acroread 5.1 on Windows and again with Acroread 6 on Windows (Xerox Docuprint 24 printer) please open the file in Acrobat Reader and print to file ! Attach the file to this issue. I don't see a different to track this down other than having a look at the file that provoces the error
Created attachment 9850 [details] Errors out when trying to convert to PDF using Adobe Distiller 4.0
Created attachment 9851 [details] resulting Distiller log file
the postscript file you attached is invalid because the printer driver %%Creator: PScript5.dll Version 5.2 created invalid code. It does not emit an implementation for the TZ function. The TZ implementation is part of a bigger PDF definition section that is completely left out by the driver. Just have a look at http://www.cs.york.ac.uk/ftpdir/pub/stress/auj/auj-23-1/17.prn to get an idea how it should look like. The driver bug probably gets triggered because you try to create PostScript for a %%TargetDevice: (HP LaserJet IIISi) (52.3) 400 which is considered to be a Postscript Level 1 printer. %%LanguageLevel: 1 I guess that they simply forgot to implement the required support for PostScript Level 1 You may want to try to generate Postscript for a Level 2 printer as a workaround (i.e. Xerox DocuPrint N4525) Please understand that this has nothing to do with OpenOffice.org but is a pure printer driver problem.
So, to make sure I understand (since I'm using different drivers on Linux and Windows), you're basically saying that I may be using Level 1 Postscript drivers on both my Linux and Windows systems? This sounds plausible, though doesn't Distiller (on Windows) use the same ps driver as OOo? Distiller-generated PDFs printed fine for me. Thanks for your help - I'm hopeful that the print driver is the culprit.
Don't get me wrong, I don't know how Acrobat Reader is implemented on Unix or on Windows. My judgement came solely from the ps file you attached. It definitively is a PostScript Level 1 file, and it has the described bugs. In my Unix Acrobat Reader I can specify the PostScript Level when printing. However it generates valid code for both Level 1 and Level 2, both containing the definitions for "TZ". I use the same printer driver (PScript5.dll) as you do, but pointing to a Level 2 printer (Xerox N24) and it works out of the box.
Workaround: On Linux, if I print to the default OOo Generic Printer (with 'print to file' checked), then take the resulting .ps file and run it through PS2PDF, the resulting PDF prints fine. It also turned out to be quite a bit smaller than the OOo Export to PDF (18k vs 173k).
Created attachment 10201 [details] Document printed to OOo default Generic Printer, then results run through PS2PDF
*** Issue 23989 has been marked as a duplicate of this issue. ***
My problem is that OO Writer 1.1.0 "Export as PDF" created files will not print when using Adobe Acrobat Reader 4.0 at Kinko's Copies WIN XP computers here in the San Jose California area. I have a LaserJet 4si/MX WIN98 printer driver installed on my WIN98 computer where I run OO Writer 1.1.0 . This is related to issues 19824 and 23989 as listed in Issuetracker. The following is what is printed out on the paper issued from the PostScript printer dump. ERROR: undefined OFFENDING COMMAND: TZ STACK: -1 /CAAAA+TimesNewRomanPSMT /N14 -mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Under WIN98SE, I used OpenOffice Writer 1.1 create a text file or business cards, then [Export to PDF files]. I put the PDF files on the web for later viewing while at Kinkos Copies or put them on a floppy disk and take them to Kinkos to print out. Using Adobe Acrobat Reader 4.0 on the Kinkos WIN XP computers I can view the files correctly on the screen display, but when printing out to a postscript printer I get the offending COMMAND: TZ error report on the postscript printer, too. So end result no business cards and no other prints from OpenOffice.org. 1.1.0 PDF files at Kinkos Copies. I had a friend using Adobe Acrobat Reader 5.1 print out the files just fine from his WIN XP on his local attached printer. You say it is a printer driver problem, not a OO problem. I see the workaround of printing to a .ps (postscript file) first and using some linux "ps2pdf" command to create a PDF format file. Any Other suggestions for OO to incorporate the following postscript code related to the TZ command into the OO generated PDF output so that PDF files printed on level 1 printers work at Kinkos Copies here in the USA? I see that I have a LaserJet 4SI/MX printer driver installed on my WIN98 computer, from the original Microsoft printer driver CAB files, that is running OpenOffice Writer 1.1.0. Per "cp" replies from inside file http://www.cs.york.ac.uk/ftpdir/pub/stress/auj/auj-23-1/17.prn I find the coding of the undefined TZ command that printing the PDF file errors out saying ERROR: undefined OFFENDING COMMAND: TZ /TZ { /_usePDFEncoding xdd findfont dup length 6 add dict begin { 1 index /FID ne { def } { pop pop } ifelse } forall /pdf_origFontName FontName def /FontName exch def currentdict /PaintType known { PaintType 2 eq {/PaintType 0 def} if } if _usePDFEncoding 0 ge { /Encoding _pdfEncodings _usePDFEncoding get def pop } { _usePDFEncoding -1 eq { counttomark 0 eq { pop } { Encoding 256 array copy modEnc /Encoding exch def } ifelse } { 256 array trEnc /Encoding exch def } ifelse } ifelse pdf_EuroProcSet pdf_origFontName known { pdf_origFontName pdf_AddEuroGlyphProc } if Level2? { currentdict /pdf_origFontName undef } if FontName currentdict end definefont pop } bd So, cp, you might be indicating that it is an Adobe Acrobat Reader 4.0 problem with sending Postscript Commands from a windows printer driver to a printer, ( that might be corrected in Adobe Acrobat Reader 5.1 ). IE if the OO created .PDF file is displayed in the ADOBE ACROBAT Reader screen, then this is not a true OO 1.1.0 printing problem. IE Nothing wrong with the contents of the "viewable" OO create .PDF file. Fred Finster fredf@netscape.net
please ask Kinkos to upgrade their Acrobat Reader to a more recent version. It does not make sense to create fancy hacks in OpenOffice to circumvent bugs in outdated Adobe products. Summary: (i) I don't have a clue how to fix it (ii) The indicated code snippet for TZ is copyrighted by Adobe and we must not include it (iii) it does not make sense to fix it since it is already fixed where it belongs
I suggest this issue be reopened. I am using both 1.1.0 and 1.1.1a. In both I exported as PDF a 263 page document. I took the disk with the pdf files on it to Kinkos who tried using Acrobat Reader 4, 5.2 and 6.0 (I have 5.2). Note that it prints perfectly from my linux computer to my Epson Stylus C80, but eats up so much ink printing in the quality my publisher wants that it is cost-prohibitive for me to print at home. At Kinko's, no matter what version of Acrobat Reader they tried, they got this message: ERROR: undefined OFFENDING COMMAND: TZ STACK: 1 /Courier-BoldObolique /NF77 -mark- This error message appears in all versions they used. It is output from OOo to the .pdf file. Why it prints fine in linux but fails on a Windows system I have no idea, but it should be looked into, not simply ignored.
I am running the linux version. My wife works in Windows 95. When printing the .pdf file on her machine, we get the same error that Kinkos got with all their versions of Acrobat Reader (from 4.0 to 6.0). I find that "Export to PDF" in the linux version produces an unreadable file in Windows computers. I closed OOo down completely (1.1.0 and 1.1.1a) and tried to run ./spadmin. I installed a new printer with "Connect a PDF converter" after "New Printer." When I used "The default driver", I again get a pdf that can be read on my system but not on Windows. Only by installing Using Adobe Distiller as the drive do I get a usable file. I also find I have to remove font substitutions for Times New Roman (Times makes a mess in PDF with really horrible spacing) as well as Arial -> Helvetica. Conclusion: The linux version of "Export to PDF" as the "Connect a PDF converter" (through spadmin) using the "default driver" produce the same file types neither of which can be read in the Windows versions of Acrobat Reader, nor can they be printer. Workaround (far from obvious): Do not use "Export to PDF". Create a new printer under spadmin as "Connect a PDF converter" and choose the "Adobe Distiller driver" to get a version of PDF that will view and print on a Windows computer. This workaround is the only way Kinkos can print my book. BTW, using this solution, the PDF file is viewable and printable using AR 4.0, 5.2 and 6.0 (at Kinkos). I hope this gives some hints to correcting this mess. I write books and have large files. It is cost effective for Kinkos to print them for me (costs about 8% of printing them myself). Please direct this to someone who knows enough to look at the situation. The problem is obviously in the conversion routines in OOo and not simply in AR.
Robert, the "export as pdf" feature is not connected in any way to printing or spadmin. So whatever settings you change there has no effect regarding this issue Your statement regarding > This error message appears in all versions they used. > It is output from OOo to the .pdf file. unfortunately is slighty incorrect. It is output of the Adobe Acrobat Reader respectively of the Windows Printer driver. As you can see from the error message it is a PostScript error, not a PDF error. It is not the PDF created from OpenOffice.org but the PostScript generated from Adobe Acrobat Reader respectively the PScript5.dll ! If you want to learn more about possible workarounds I recommend that you visit Adobes Support Knowledgebase (here: http://www.adobe.com/support/techdocs/150d6.htm). In example you might want to try to "Print the PDF file as an image" as it is described there in more detail. Furtheron I strongly recommend reading the section about "Resolving problems printing any PDF file to a PostScript printer". Setting the PostScript Level to "2" in the "Advanced" Printer Options might help as well. Since you seem to be able to reproduce the problem I suggest that you tell this problem to Adobe on their support web site: http://www.adobe.com/support/forums/main.html in the sections "Adobe Reader" or "Adobe PostScript Printer Drivers ... Win" and let us know their answer. I close this issue as I cannot see what we can do to change the PostScript generated by Adobe Acrobat Reader.
cp, you wrote "Robert, the "export as pdf" feature is not connected in any way to printing or spadmin. So whatever settings you change there has no effect regarding this issue" Yet the conflicts with what I have seen. I understand the PS 1 problem, yet "Export to PDF" does not allow me to set any levels for pdf output. Summary of issue: Using Export to PDF produces a file that can print on my machine but not on any Windows machine. What you seem to have missed is that when it does not print, it also cannot be viewed in a Windows machine. If it cannot be viewed, there is no way to select "Print as image." There are no options to choose other than quality (Screen, Print and Press quality). None of these affect the problem. Setting up a pdf printer through spadmin does not work with "default printer" -- same problem exactly. No way to set PS level. Setting up a pdf printer through spadmin DOES work with Adobe Distiller driver. Again, no way to set PS level, but it doesn't matter. If OOo supplies three ways to print to a pdf file and only one works printing to a Windows machine, it seems like it would be an OOo problem. You write: "If you want to learn more about possible workarounds I recommend that you visit Adobes Support Knowledgebase (here: http://www.adobe.com/support/techdocs/150d6.htm). In example you might want to try to "Print the PDF file as an image" as it is described there in more detail. Furtheron I strongly recommend reading the section about "Resolving problems printing any PDF file to a PostScript printer". Setting the PostScript Level to "2" in the "Advanced" Printer Options might help as well." The relevant paragraphs on that site read: "Resolving problems printing any PDF file to a non-PostScript printer "If you have problems printing any PDF file from an Acrobat product to a non-PostScript printer, do one or more of the following, printing after each task: "Disclaimer: Some of these solutions require you to change the printer driver properties. The locations for specific properties vary by printer and by printer driver. Therefore, Adobe Technical Support cannot provide detailed information about the location for each property. Contact the printer manufacturer or refer to the printer documentation for more information." The solution directs itself to the way the application (OOo) outputs a pdf file. With Acrobat Reader, the options selection is not available (no "Advanced" settings). I will try to get a response from the Adobe site, but in the meantime, I am hoping desperately that the two different methods for producing a pdf continue in future versions of OOo.
May i suggest not changing the PostScript level each time you print but permanently in you Windows printer options ? Please configure your printer using the Printers configuration on "My Computer".
Robert, you are referring to the hints for "Resolving problems printing any PDF file to a non-PostScript printer ". Since you have problems with a PostScript printer you need to check "Resolving problems printing any PDF file to a PostScript printer" as I suggested earlier (please notice the difference non-PostScript vc. PostScript in the heading) you mentioned > when it does not print, it also cannot be viewed in a Windows machine In fact it can be viewed fine in any Acrobat Reader on any platform . Please read the original bug description of briansix for reference. > "Export to PDF" does not allow me to set any levels for pdf output. You need to set the PostScript Level when printing to Kinkos printer with Acrobat Reader, not when exporting to PDF in OpenOffice.org. The same is with the "Print as Image". This is the option you need to choose in Acrobat Reader when printing the PDF in Kinkos Copy shop. How to do so is described in detail in the Adobe Support database.
Kinkos (at least here) does not allow customers access to their computers, so we cannot set the options for pdf and they can read it only when printed to Adobe Distiller (so far). If I read both you and the Adobe site correctly, what I need to do to "Export" is set it as "Image File" to get the output pdf to print both in linux and Windows. If that is correct, I will file an issue to have it mentioned in the Help files.
cp: according to the Adobe webside (http://www.adobe.com/products/printerdrivers/windows.html) the Adobe printer driver does not support PostScript Level 1. The LaserJet IIIsi briansix used for his sample document is a PostScript Level 1 printer and is therefor unsupported by Adobe. You can check by printing to file and checking for the strings %%LanguageLevel: 1 and %%Creator: PScript5.dll in the file. This combination will not work.
Created attachment 13110 [details] small sample file for the issue (pdf)
Created attachment 13111 [details] small sample file for the issue (ps)
I had a chat with the Adobe support on their support side. According to them Acrobat Reader does not use the Printer-driver to create PostScript code. So updating the driver won't help probably. You need to upgrade the Acrobat Reader. (1) Acrobat Reader 4.0 is not supported for Windows XP. The first version of Acrobat Reader that Adobe explicitly supports for Windows XP is Acrobat Reader 5.0.5. (2) Acrobat Reader 4.0 was replaced by Acrobat Reader 4.0.5 to resolve a large number of problems. Neither Acrobat 4.0 nor Acrobat Reader 4.0 should be in use anywhere due to the number of problems that were fixed by the free update to 4.0.5. Bottom line is that you are using a non-supported version of Reader. Given that you are on Windows XP, you should totally uninstall the Acrobat Reader 4.0 you have and then download and install Adobe Reader 6.0.1. That will apparently resolve your problems. Bottomline is: please upgrade to the most recent Acrobat Reader if you encounter this problem. If the problem remains, please come back to this bug and I will bug Adobe again.
is double checked that after upgrading from Acrobat Reader 4.0 to 5.1 the problem was gone.
closing