Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

print archived PDF

Former Member
0 Kudos

Hello everyone,

I have a requirement that is to retrieve a PDF file from IXOS and print it.

I have done the retrieve part with function modules ARCHIV_GET_CONNECTIONS and ARCHIVOBJECT_GET_TABLE. The second FM returns two tables, one of type DOCS and the other type TBL1024, with the binary of the PDF archive.

Now I need to send this print binary to a spool order and print.

I have tried to find out any function module to convert BIN to OTF, but was only able to find OTF to PDF conversions.

Could anyone help me.

-

-


edit------

Is this even possible?

Thank you,

Fábio Galvão

Edited by: fabio.galvao on Jul 1, 2010 12:04 PM

5 REPLIES 5

Former Member
0 Kudos

Hi,

You can use FM "CONVERT_OTF". You can upload your data from a binary file into an internal table. Then using the FM for the OTF you can transform this into an OTF file and with the FM for the PDF you can transform your data into a PDF format.

For more info, see this thread:

1.

2. http://wiki.sdn.sap.com/wiki/display/ABAP/PDFfilesin+SAP#PDFfilesinSAP-HowtoconvertSAPscriptoutputintoPDFbinary%3F

May this helps you.

Regards.

Deepak Sharma

0 Kudos

Thanks for your reply Deepak,

But I don't want to convert from OTF to PDF, I want to convert from PDF to OTF so that I can send this to a spool order. Does this 'CONVERT_OTF' FM work in this case?

Thank you,

Fábio Galvã

0 Kudos

Hi,

Check this FM SX_OBJECT_CONVERT_OTF_PDF.

Check these link also:

May it helps you.

Regards.

Deepak Sharma

Former Member
0 Kudos

Hello everyone,

I've managed to create a empty spool order using FM RSPO_SR_OPEN, and then I perform a loop at the table binarchivobject, that the FM ARCHIVOBJECT_GET_TABLE returns with the binary of the pdf, writing the binary using FM RSPO_SR_WRITE_BINARY performing a MOVE binarchivobject-line TO data_line. After all the data is writen i use FM RSPO_SR_CLOSE to close the spool order.

Now, my problem is that what's sent to the printer is something like this:

"%PDF-1.4#1 0 obj#<</Type /Catalog#/Version /1.4#/Pages 4 0 R#>>#endobj#2 0 obj#<</Producer (Report.NET by root-software ag)#/CreationDate (D:20100615)#/

116.22 738.431 Td#(10ELM700434) Tj#ET#BT#172.913 738.431 Td#(15-06-2010 / 17-06-2010) Tj#ET#BT#314.646 738.431 Td#(Financeiro) Tj#ET#BT#399.685 738.431 "

and the printer does not recognize this as a PDF and prints the code just like this.

So i'm guessing I might need a conversion or something like this. Anyone as any Ideas?

Thank you,

Fábio Galvã

0 Kudos

SAP said that it's not possible to send a pdf's binary to spool.

So I went to another solution... sending the document to a e-mail address.

Thank's everyone.