cancel
Showing results for 
Search instead for 
Did you mean: 

Print an image/pdf/excel files recieved as XML by creating spool request

Former Member
0 Kudos

Hello Experts,

I have requirement to Print PDF/Image/excel file directly on local network printer. These files are received in a XML.

Actually i am displaying the Document ids on ALV grid on a webdynpro screen. when i select particular document id and click on print button the document should print on local N/W printer.

so far i tried by converting the XML content to PDF and then creating a spool request for this but it is not working.

Please help me to do this....

Thanks in Advance..................................

Govardhan Duvva.

Accepted Solutions (0)

Answers (1)

Answers (1)

jwood_bowdark
Active Participant
0 Kudos

Hi Govardhan,

Where is the error occurring? It sounds like you were successful in transforming to PDF, so I'm guessing that the error is in the spool request? Am I correct so far?

If so, then my first question would be how are you creating the spool request? Are you sending the raw PDF content straight to the spool? If so, then this is likely the source of your error since most printers can't deal with raw PDF content. To get around this issue, you would need to convert the PDF content into a more printer-friendly format such as PostScript.

If you have ADS in your landscape, then you might be able to use its services to convert the PDF content. The sample program FP_PDF_TEST_04 provided with Adobe Document Services demonstrates how the PDF object is used to convert PDF to PS. However, the methods it uses have since been deprecated, so you would have to refactor the code to use the newer SET_TASK_RENDERPDL() method. This method requires that you specify a template in addition to the raw data, so it's a fairly significant departure from the old functionality. Still, perhaps a dummy template could be introduced to make it work.

Short of that, you might have to engage an OS-level process to convert the PDF content. Once you get your hands on the PostScript content, you should be all set I think.

Hope this helps. Thanks,

James