Skip to Content
avatar image
Former Member

Printing remote PDF

Hi,

Is it possible to automatically print a PDF file which is located on a different server (like http://www.myserver/mypdf.pdf).

I have build a small program for opening it with method "CALL METHOD cl_gui_frontend_services=>execute..." but my user want to do mass printing.

Is it any way to do it ?

Thx.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jun 22, 2010 at 08:19 AM

    Hello, I am ready to help, but please clarify the scenario.

    Will you use ADS - Adoe forms integration? Or what kind of PDF printing?

    How and where do you have/ get the data?

    What is the connection between the systems?

    Both systems are SAP systems?

    Otto

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2010 at 06:47 AM

    Hi,

    Sorry for late answer, yes we have ADS for PDF form generation (on SAP Side).

    But for my problem (printing external PDF) i have PDF files located on a different server (not a SAP system).

    I can access for example to this file with url access like http://www.myserver/mypdf.pdf.

    What is my requirement (or my whish), it's from an ABAP programm, to get the file located on http addr. http://www.myserver/mypdf.pdf and send it to the SAP spool (or to create a spool request with it).

    Actually i have found a solution to open it from an ABAP programm to a web browser with this simple code

    CALL METHOD cl_gui_frontend_services=>execute

    EXPORTING

    document = url_to_open

    EXCEPTIONS

    OTHERS = 1.

    This programm is call during the printing of an invoice (with TC NACE i have build a condition for output control) but it's not usefull for end user because they want to print directly this external PDF and not open it.

    Help is welcome.

    Thx.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2010 at 08:42 AM

    Thx a lot for this, but the pdf file located on an other server is not generated by SAP, it's a stupid PDF generated by Word (for example).

    In addition i have investigate programm FP_PDF_TEST_04, which allow to convert PDF file to PS file... on this programm i can open/read the content of the PDF.

    Is there any option to send directly the PDF content (in raw format) to the printer ?

    i have try with a stupid txt content and RSPO_WRITE_SPOOLREQUEST but it doesn't work.

    Add comment
    10|10000 characters needed characters exceeded

    • not generated by SAP, it's a stupid PDF generated by Word (for example).

      You cannot change it in any way in SAP. At least I am not aware of any way you could do it. If it is "stupid", than it has no internal structure, so there is no way you could manipulate the content, because the system would not understand what part do you want to change and how (it has no internal structure!).

      In addition i have investigate programm FP_PDF_TEST_04, which allow to convert PDF file to PS file... on this programm i can open/read the content of the PDF.

      I am afraid I don´t understand why would you use such program? But if you would be able to load the form successfully into the memory (like create an object filled with the loaded form), then there could be a print method of the pdf object. But i doubt it works with totally stupid external PDF files.

      I must add my personal opinion: I don´t understand the process at all. Is that all only because you want to "register" some external print under a SAP user? Or to use SAP as a central printer? Man, it is not worth the time, I have no idea if that is even possible. But sounds like weird task...

      Regards Otto

      p.s.: you can ask under ABAP Printing, I saw some similar questions there, I think.

  • avatar image
    Former Member
    Aug 20, 2010 at 09:42 AM

    my problem It's simple, on SAP side my user edit 3 SAP document. They should edit an other one which is not a SAP document but a simple PDF file located on an other server.

    To avoid my user to connect to a shared folder, open this PDF file and print it, i would like, inside an ABAP programm to open/read this PDF file (located on a shared folder) and send it to the printer.

    So, to resume, when printing the 3 SAP document, i would like in addition to open a foreign PDF document and send it to the printer. At the end 4 document will be printed.

    It's not a form it's a PDF file, you can consider that it could be a text file, or word file, etc...

    Add comment
    10|10000 characters needed characters exceeded

    • They should edit an other one which is not a SAP document but a simple PDF file located on an other server.

      You cannot edit a stupid PDF file, I think. How is that document created? Why do you want to edit it anyway? If that is word file exported to PDF, change the word file and export again. If that is some kind of a template, then recreate it as a real Adobe form, not a plain PDF. In SAP or in LCD outside SAP. Then either a human (in Reader) or a machine (like sap program) can edit the content easily.

      The rest, about downloading and printing the documents, is not PDF related problem. So I cannot help regarding this part.

      Otto

  • avatar image
    Former Member
    Aug 20, 2010 at 12:36 PM

    😊, you don't understand me, or sorry it's me who don't explain correctly...

    When i speak about "edit", i mean "print", i want to print from an abap programm a PDF file which is located on a shared folder (or uploaded by a screen selection), that all...

    Add comment
    10|10000 characters needed characters exceeded