PDF to Zip conversion

Quick overview of requirement:
Create dynamic variants and submit background job which in turns call Samarforms to create OTF spools. Once all the jobs are completed, read spool file(s) and convert them to PDF. The next step is to add these PDF files to a zip file and the last step is to download the zip file.
Progress:
Created dynamic variants using: RS_VARIANT* function modules. Created jobs using JOB_* function modules. Read the spool file from TBTCP table. Converted to PDF using u201CCONVERT_OTFSPOOLJOB_2_PDFu201D (Online conversion).
Now this is where I am stucku2026 If I download the PDF file to my local PC and then upload it back again then it worksu2026 Once I upload the downloaded PDF file I use function module u201CSCMS_BINARY_TO_XSTRINGu201D and add it to zip file using ABAP class cl_abap_zip. Then I use FM SCMS_XSTRING_TO_BINARY to get the data in table format which I can download using gui_download.
Question:
Once I call the FM u201CCONVERT_OTFSPOOLJOB_2_PDFu201D, how do I covert the contents of the PDF output to something that can be sent to cl_abap_zip for zipping? Since this program will be running in background and will have lots of data I cannot use the UPLOAD - DOWNLOAD. I am stuck now... any help is greatly appriciated.
Thanks
Sunil

check this thread
https://forums.sdn.sap.com/click.jspa?searchID=23399788&messageID=7001436

Similar Messages

  • In PDF to Excel conversion dates like 03/12/15 convert to Dec 3rd 2015 not the correct date of Mar 12th 2015 whereas date 03/13/2015 converts correctly as March 13th 2015

    In PDF to Excel conversion dates like 03/12/15 convert to Dec 3rd 2015 not the correct date of Mar 12th 2015 whereas date 03/13/2015 converts correctly as March 13th 2015

    Hi DirTech,
    Are both of these dates in the same Excel file? If they're in different files, are you choosing the same language for OCR (optical character recognition)?
    If they are in the same PDF file, how was that PDF file created? Was it created from a third-party application (rather than an Adobe application)? If it was created by a third-party application, it could be that it wasn't written to spec, and that's why you're seeing some oddities in the PDF > Excel conversion.  (See Will Adobe ExportPDF convert both text and form... | Adobe Community.)
    Best,
    Sara

  • Why is my PDF to Word conversion unreadable ?

    Why is my PDF to Word conversion  just code?

    Could you copy and paste a section of text from the original and from the converted file?

  • I receive an error message when submitting a pdf file for conversion to a Word document "... an unex

    I receive an error message when submitting a pdf file for conversion to a Word document "... an unexpected error has occurred..."   - is there a way to overcome this error?

    I received your Scan.pdf sent to [email protected] and had no problem to convert it via Export PDF service. Could you try again?
    Jyh-Jiun Liou

  • The Refiner Result type: When refine by result type: PDF or Zip sometimes files which are images are shown (not pdf or zip)

    Hi,
    We use Search Refiners and there is a strange problem: when we refine by the Refiner Result type: Zip and PDF we also get files which are gif files.
    keren tsur

    Hi,
    According to your post, my understanding is that you get the gif files sometimes when you refiner the Result Type PDF or ZIP.
    I try to do this test in my environment, however, the result is I get the corresponding PDF file and don’t get the gif files by Refiner the PDF Result Type in Search Center.
    Do you get all gif files by the Refiner Result Type: PDF or ZIP in Search Center?
    And, do you see these gif files under the Refiner Result Type: Image?
    I recommend that you can try to respectively type the “PDF”, “ZIP” and “gif” in search box to compare the search results.
    Also, you can try to go to SharePoint 2013 Central Administration, click “Search Service Application” in “Manage service application”, click the “Index Reset” to reset all crawled content, then start Full Crawl again.
    Best Regards,
    Yumi Fu

  • I am trying to export the PDF file and conversion fails every time.

    I am trying to export the PDF file and conversion fails every time. File is too large of too complex. What do I do? One file is about 55 mb and the other is 58 mb.

    Try extracting part of the file and see if the extracted part can be Exported. If so, repeat with the next set of pages. When done, try to load all into the first file.

  • I bought 2 hrs ago pdf to Office conversion access. It is so horrible, I need to cancel subscription right now

    I bought 2 hrs ago pdf to Office conversion access. It is so horrible, I need to cancel subscription right now
    the website is so bad that it goes around in a circle- & you cannot access a place where you click & it is done. Nope.. If I cannot cancel it tonight, I will have to call the c/c  to force the issue. I wasted my evening on this silly thing....
    Pl call 818 523 8735 now.

    Dear Sir:
    I think you do not seem to understand: this link you provide is TOTALLY
    BOGUS & FRAUDULENT!
    This is precisely the point of my email.
    If I go there, & YOU CLICK SOME indeterminate options..& it opens another
    tab & it is exactly the same as the one you came from. & on it goes.
    Adobe shoul know better!
    Unless, you are pulling off another AOL thing of the '90s.
    I am going to call the credit company & report it as fraudulently charged.
    See if that works.
    robin

  • I am trying to upload a pdf file for conversion to Word but keep getting an error on your part?

    I am trying to upload a pdf file for conversion to Word but keep getting an error on your part?

    I received your Scan.pdf sent to [email protected] and had no problem to convert it via Export PDF service. Could you try again?
    Jyh-Jiun Liou

  • Mail Distorts & Corrupts Files (images, PDF's .zips)

    Hello,
    I constantly send images, PDF's, .zip files using Mac Mail and the receiving party usually reports that the images are distorted, PDF's cannot be opened and .Zip files are corrupt. What can I do?

    firstly - is the receiving party using a mac or windows box?
    If windows - are you checking the "send windows friendly attachments" box?.
    You can make this the default setting in Mail - Edit - Attachments - always send windows friendly attachments. There should be a check mark next to it.
    If another mac user - are they using apple's Mail app, or some other one?
    If you send an email to yourself - do the images/pdf's/zips come through as normal?

  • Building PDF file using Conversion Agent

    Hello Experts,
    Is it possible to build a PDF from XML using Conversion Agent?
    Best Regards,
    Artsiom Anichenka

    Hi,
    This might help you
    /people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield
    /people/alexander.bundschuh/blog/2006/03/14/integrate-sap-conversion-agent-by-itemfield-with-sap-xi
    /people/paul.medaille/blog/2005/11/18/conversion-agent-a-free-lunch
    /people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
    https://websmp102.sap-ag.de/~sapdownload/011000358700001090982006E/ConvAgentDocSP16.zip
    https://websmp102.sap-ag.de/~sapdownload/011000358700004921152005E/ConversionAgent.pdf
    Regards
    Agasthuri Doss

  • PPT action buttons are not present in pdf file upon conversion

    Hi
    Am using Office 2003 (SP3) and Acrobat 8 (version 8.1.6).
    Have been using action buttons in the presentations for several years, works fine.
    When converting existing files, action buttons in both PPT show and pdf file just works, no problems.
    Newly generated presentations work fine as PPT show. But when converted to pdf file, the action buttons are simply missing.
    Have verified that all action buttons are "at front", same result.
    Have tried to avoid corporate templates by creating a blank presentation and building a small and simple navigating presentation. Again, works fine as PPT show. And again, upon conversion there are no action buttons present in the pdf file.Corporate changes thereby should be ruled out.
    Have checked all settings (including "Adobe PDF, Change Conversion Settings") between a working and a non-working PPT file, can't identify any differences.
    A colleague helped out (using Acrobat 6), same result. But upon activation of "Adobe PDF, Change Conversion Settings, Restore Defaults", the action buttons worked for him. Tried it with Adobe 8, no such luck.
    Have trialed the "Prep 4 PDF" tool, then the PDF file is complete and the "go to slide" keys appear and work again.
    All new updates available are installed, anyone experienced the same and found a fix for this trouble?

    Have tried both ways, same result.
    When working with new presentations, the pdf file is viewable, but the action buttons are not present.
    When working with past presentations, the action buttons are present and do work as expected.

  • How to upload a PDF file, zip it and download the zipped file?

    Hi Experts,
    I have a requirement to upload a PDF file, convert that to a ZIP file and download it. If anyone has worked on this requirement, can you please guide me on this? Thanks.
    Avi

    Here you go.  Hope it helps.
    REPORT  zrich_0004.
    DATA: lt_data TYPE TABLE OF x255.
    DATA: ls_data LIKE LINE OF lt_data.
    DATA: lv_zip_content TYPE xstring.
    DATA: lv_size  TYPE i.
    DATA: lv_filename TYPE string.
    DATA: lv_path TYPE string.
    DATA: lv_fullpath TYPE string.
    DATA: lt_filetab TYPE TABLE OF file_table.
    DATA: ls_filetab LIKE LINE OF lt_filetab.
    DATA: lv_rc TYPE sy-subrc.
    DATA: lv_content TYPE xstring.
    DATA: lo_zip TYPE REF TO cl_abap_zip.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_up TYPE string DEFAULT 'C:\upload.pdf' .
    PARAMETERS: p_down TYPE string DEFAULT 'C:\download.zip' .
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_up.
      REFRESH lt_filetab. CLEAR ls_filetab.
      cl_gui_frontend_services=>file_open_dialog(
          CHANGING
            file_table              = lt_filetab
            rc                      = lv_rc
        EXCEPTIONS
          OTHERS                  = 5 ).
      READ TABLE lt_filetab INTO ls_filetab INDEX 1.
      IF sy-subrc = 0.
        p_up = ls_filetab-filename.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_down.
      CLEAR: lv_filename, lv_path, lv_fullpath.
      cl_gui_frontend_services=>file_save_dialog(
         CHANGING
           filename             = lv_filename
           path                 = lv_path
           fullpath             = lv_fullpath
         EXCEPTIONS
           OTHERS               = 4 ).
      p_down = lv_fullpath.
    START-OF-SELECTION.
      CREATE OBJECT lo_zip.
    * Read the data as a string
      cl_gui_frontend_services=>gui_upload(
        EXPORTING
          filename                = p_up
          filetype                = 'BIN'
        IMPORTING
          filelength = lv_size
        CHANGING
          data_tab                = lt_data
        EXCEPTIONS
          OTHERS                  = 19 ).
    * convert binary to xstring
      CLEAR lv_content .
      CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
        EXPORTING
          input_length = lv_size
        IMPORTING
          buffer       = lv_content
        TABLES
          binary_tab   = lt_data
        EXCEPTIONS
          failed       = 1
          OTHERS       = 2.
    * Get the file name of the uploaded file
      DATA: lv_upfilename TYPE string.
      DATA: lv_tmp TYPE char1024.
      DATA: lv_tmp_file TYPE char1024.
      lv_tmp = p_up.
      CALL FUNCTION 'STRING_REVERSE'
        EXPORTING
          string  = lv_tmp
          lang    = sy-langu
        IMPORTING
          rstring = lv_tmp.
      SPLIT lv_tmp AT '\' INTO lv_tmp_file lv_tmp.
      CALL FUNCTION 'STRING_REVERSE'
        EXPORTING
          string  = lv_tmp_file
          lang    = sy-langu
        IMPORTING
          rstring = lv_tmp_file.
      lv_upfilename = lv_tmp_file.
    * add to zip file.
      lo_zip->add( name = lv_upfilename content = lv_content ).
      lv_zip_content   = lo_zip->save( ).
    * Conver the xstring content to binary
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer        = lv_zip_content
        IMPORTING
          output_length = lv_size
        TABLES
          binary_tab    = lt_data.
    * download
      cl_gui_frontend_services=>gui_download(
          EXPORTING
            bin_filesize = lv_size
            filename     = p_down
            filetype     = 'BIN'
          CHANGING
            data_tab     = lt_data
          EXCEPTIONS
            OTHERS       = 24 ).
    Regards,
    Rich Heilman

  • Maintaining Links in a PDF to Word Conversion

    Is it possible to convert a PDF to Word using Acroabt X Pro so that all of the links in the PDF will work in the Word file?  The PDF was created from FrameMaker 9 files and contains many internal cross references. When I perform the conversion, the layout of the Word file looks great, but none of the links work.

    Not possible.

  • Base64 to pdf. After conversion - how to show pdf file ?

    Hello all,
    I have to show and save a pdf file from internal table ion base64 format.
    I mean that I receive an internal table with data in base64 that represent a pdf file. I have
    to convert it into pdf file than show and save the file.
    I maked a conversion by:
      CALL METHOD utility->decode_base64
        EXPORTING
          encoded = encoded
        RECEIVING
          decoded = decoded.
    and, now my question is :
    What I have to do about the string decoded ? I have to append it somewhere ?
    and, how to create a pdf file from decoded string ?
    tks a lot.

    How to show PDF using SAPGui
    Please check my reply in the following thread

  • PDF to InDesign Conversion?

    Has anyone had success converting PDF files to InDesign? tested PDF2ID but formatting gets lost..

    Formatting, or styles?
    PDF is a final output file format and doesn't retain style information, but the formatting applied to the type should remain. Since there is no style information in the PDF, all the text should, I think, be styled with no paragraph style or possibly [Basic Paragraph] and have local formatting overrides applied after conversion. That's the best you can hope for with what's currently available.

Maybe you are looking for