Menu

#41 wpr3287 prints 0 byte files using "Microsoft Print to PDF"

v1.0 (example)
open
nobody
None
5
2022-10-27
2022-10-26
No

When trying to use the "Microsoft Print to PDF" printer to get the print output in PDF files instead of on dead trees the resulting file ends up being empty and the windows print spooler logs an error.

wpr3287 is used like this on a Windows 10 client (also tested Windows Server 2016 with the same result):
wpr3287.exe -V -printer "Microsoft Print to PDF" LU@host

When printing it creates a file in the %USERPROFILE%\Documents folder called "pr3287 print job.pdf" but it ends up being 0 bytes. The following message is logged in the Microsoft-Windows-PrintService/Admin log:
The document Print Document, owned by USER, failed to print on printer Microsoft Print to PDF. Try to print the document again, or restart the print spooler.
Data type: RAW. Size of the spool file in bytes: 3010. Number of bytes printed: 3010. Total number of pages in the document: 0. Number of pages printed: 0. Client computer: \COMPUTER. Win32 error code returned by the print processor: 2152796175.

Discussion

  • Paul Mattes

    Paul Mattes - 2022-10-26

    The Windows version of pr3287 only works with printers that accept a simple text stream and work out the font formatting themselves. The Microsoft Print to PDF printer driver only works with GDI-based apps, where the app handles the font formatting and 'draws' the text onto a canvas, like rendering onto a graphical display. You can use Microsoft Print to PDF for wc3270 screen printing (which does have GDI support), but not yet with pr3287.

    There is a to-do list item to extend Windows pr3287 to be able to do GDI, but there is no schedule yet for doing this.

     
  • Pawel Worach

    Pawel Worach - 2022-10-27

    Ah, thanks for the explanation. As an alternative would it be possible to output text files after EBCDIC decoding straight from pr3287?

     
  • Paul Mattes

    Paul Mattes - 2022-10-27

    Yes, that sounds like a wonderful idea, and much easier than adding full GDI support (which I would still like to do). Now I need to work out the best way to specify a file or folder name.

     

Log in to post a comment.