Resolved Printing Over Appserver (using Output To Printer)

Venkateswarlu N

New Member
Hi Seniors,

I have a situation.

Progress version: 10.2b.
OS: windows 2008 R2
Printer: XPS Writer/local Xerox Printer

I am trying to print a PDF, by setting 'session: printer' and using 'output to printer'.
Print happens, but it is all wrong. Whole document is printed in 2/3 lines.
and I can see an error 'Warning: Mixed printing mode detected. Use -wpp option for proper printing. (2858)'
I checked on this error but nothing helped.

Test code I am trying the print with
-----------------------------------------------------------------------------
Code:
def var document as char no-undo init 'C:\testfile.pdf'.
def var printer  as char no-undo init 'Microsoft XPS Document Writer'.
def var pfiledata       as memptr no-undo.
def stream infile.


file-info:file-name = document.
    set-size(pfiledata) = file-info:file-size.

    input stream infile from value(file-info:full-pathname) binary no-map no-convert.
    import stream infile unformatted pfiledata.

    session: printer-name = printer.
    output to printer.
    export pfiledata.
    input stream infile close.
    set-size(pfiledata) = 0.
    output close.
---------------------------------------------------------------------------------------------

Am I doing something wrong? What do I need to do?

Note: I tried the os-command silent (copy document printer) and it works. This works over app-server correct?

Thanks,
Venky
 
Last edited by a moderator:
Top