Merge Different Spools containing a Single PDF page into a Single PDF file.

Greetings,
I am developing a custom object where in i need to read PDF file from many different Spools(Range given on Input Screen), where each spool has a single PDF page in it. I need to combine all these PDF Pages into a single PDF file & either create a new Spool or save it on an Application Server.
At present i have developed the code where in i am able to read the PDF files from different spools & convert them into Binary but i am not able to generate it back to PDF file.
Kindly find my code for your reference.
CODE:-
START-OF-SELECTION.
  PERFORM f_get_spool_1000 .
  PERFORM g_conv_pdf_to_bin_2000 .
*&      Form  F_GET_SPOOL_1000
      text
FORM f_get_spool_1000 .
  SELECT * FROM tsp01
           INTO TABLE gt_tsp01
           WHERE rqident IN s_spool
           ORDER BY rqcretime DESCENDING.
  IF sy-subrc = 0.
    SORT gt_tsp01 BY rqident .
  ENDIF.
ENDFORM.
*&      Form  G_CONV_PDF_TO_OTF_2000
      text
DATA: lv_filename_out   TYPE string,
            lv_len            TYPE i,
            lt_tab            TYPE tsfixml .
  DATA: lwa_print_parms    LIKE pri_params,
              lv_valid(1)       TYPE c .
  DATA: lv_linsz LIKE sy-linsz VALUE 132, " Line size
              lv_paart LIKE sy-paart VALUE 'X_65_132'.  " Paper Format
  DATA : lt_tsp01 TYPE STANDARD TABLE OF tsp01 ,
               lwa_tsp01 TYPE tsp01 .
  CLEAR : gv_pdf, gwa_tsp01, gv_renderpagecount .
  LOOP AT gt_tsp01 INTO gwa_tsp01.
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
      EXPORTING
        i_spoolid         = gwa_tsp01-rqident
        i_partnum         = 1
      IMPORTING
        e_pdf             = gv_pdf
        e_renderpagecount = gv_renderpagecount
        e_pdf_file        = gv_pdf_file
      EXCEPTIONS
        ads_error         = 1
        usage_error       = 2
        system_error      = 3
        internal_error    = 4
        OTHERS            = 5.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CLEAR lv_len .
    REFRESH gt_bin .
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer        = gv_pdf
      IMPORTING
        output_length = lv_len
      TABLES
        binary_tab    = gt_bin.
    CLEAR gwa_bin .
    LOOP AT gt_bin INTO gwa_bin.
      APPEND gwa_bin TO gt_listout.
      CLEAR gwa_bin .
    ENDLOOP.
  ENDLOOP.
Get FP reference
  DATA: lo_fp     TYPE REF TO if_fp VALUE IS INITIAL,
        lo_pdfobj TYPE REF TO if_fp_pdf_object VALUE IS INITIAL,
        lo_exc    TYPE REF TO cx_root,
        lv_xslt_message TYPE string .
  lo_fp = cl_fp=>get_reference( ).
For handling exceptions
  DATA: lo_fpex TYPE REF TO cx_fp_runtime VALUE IS INITIAL.
  TRY.
      lo_pdfobj = lo_fp->create_pdf_object( connection = 'ADS' ).
  Set document
      lo_pdfobj->set_document(
        EXPORTING
          pdfdata = gt_listout ).
  Tell PDF object to extract data
      lo_pdfobj->set_extractdata( ).
  Execute the call to ADS
      lo_pdfobj->execute( ).
    CATCH cx_root INTO lo_exc.
      lv_xslt_message = lo_exc->get_text( ).
  ENDTRY.
Your quick reply would be of great help.
Regards.

Thank Your for your concern, there are many replies & posts but all of them points only to Try what they have said. As being said that trying to convert PDF to binary & appending many PDF similarly would not let you generate a single PDF again.
Your Kind guidance would be really appreciable.
Regards.

Similar Messages

  • How to combine pdf pages into a single pdf document

    I´ve done this before but I forgot. Can anyone help me?

    Hi profesora.2014.2015,
    Adobe Reader is a free trusted standard for reliably viewing, printing, and annotating PDF documents. It’s the only PDF file viewer that can open and interact with all types of PDF content, including forms and multimedia.
    In order to combine PDF pages into a single PDF file, you need to either use Adobe Acrobat (Merging and combining PDF files | Acrobat XI - Adobe India) or Adobe PDF pack (Reliably Create PDFs, Convert PDFs, & Merge PDFs Online | Adobe PDF Pack).

  • Combining multiple pdf pages into a single document

    I realize this is probably an inappropriate request -- probably? almost certainly -- for this forum, but perhaps someone can refer me to another source for a solution.
    I would like to combine several pages individually scanned to pdf format into a single pdf document. How do I do that? (I have only Adobe Reader. I do not have any applications for creating and editing pdf pages.)
    Hope you'll forgive the inappropriate request, and thanks to anyone who can refer me to a more appropriate source.
    Sincerely,
    Eric Weir

    I would like to combine several pages individually scanned to pdf format into a single pdf document. How do I do that?
    You already have the application installed -- Preview. Whether the source files are single page or multipage documents, whether they are all on size/orientation or come in multiple dimensions/orientations, simply ...
    1) Open each in a separate Preview window,
    2) Open the "sidebar" for each window,
    3) Drag one or more icon pages from any of the source Preview sidebar windows to your target Preview sidebar window,
    4) Arrange the order of the pages in the target sidebar window as desired, and
    5) Save resulting document under a new name using the "Save As..." File menu option.
    ADDED: Oops! Too slow. Someone else beat me to it...

  • How can you combine multiple PDF pages into one searchable PDF page?

    I have scanned multiple business cards and now have a PDF  file with over 500 pages (or cards). I would like to be able and create a  page with 8 cards to a page and is still searchable for text. Right now, the text is searchable. Basically have 63 pages and not 500.
    Example:
    If I wanted to find Joe Smith's card, I could search for  "Joe Smith" and it would search all of the text and bring me to the  page(s). Right now, it will bring me to that page. Is there a way to create  a page where I can have multiple cards and the text is still searchable?
    I tried to create a page in Photoshop, made 8 different layers with 8  different cards, but when saved, not only was the file way too large, but no text, or font, was detected  and there was nothing to  search for.
    Is there an option to create a page in Acrobat Professional and put 8 cards to a page?
    I have InDesign, Illustrator, Photoshop and Acrobat Professional Pro.
    Thanks,
    mr19th

    That sounds great, but I'm lost.
    I followed these steps:
    1) Open your PDF (in Adobe Acrobat Pro)
    2) Chose print
    The print/printer options pop-up will show.
    3) In the printer section, do not use your normal printer, a printer named Adobe PDF should be an option. Chose it.
    4) Under the "Page handling" section, change the Page Scaling drop-down menu to "Multiple pages per sheet".
    It works fine, but it looses all of the font information and the search no longer works. How can you do it and save the font info, so the search tool continues to operate.
    Am I missing anything?

  • How do I merge 105 PDF's into a Single PFD?

    How do I merge 105 pdf's into a single PDF.
    I have already tried doing this in PREVIEW, selecting all, and then saving, and saving as. But it is for me, to no avail. When I re-open, all I get is the first page.
    please help.

    CRB wrote:
    How do I merge 105 pdf's into a single PDF.
    I have already tried doing this in PREVIEW, selecting all, and then saving, and saving as. But it is for me, to no avail. When I re-open, all I get is the first page.
    So, I'm not the only one unable to merge docs thru Preview.
    This is why I wrote my own script to do that.
    --[SCRIPT join_PDFs]
    Enregistrer le script en tant que Script : join_PDFs.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:
    aller au menu Scripts , puis choisir join_PDFs
    Vous pouvez également enregistrer le script en tant qu'application.
    Vous pourrez alors glisser déposer les icônes de PDFs à fusionner sur celle du script.
    J'ai trouvé le code principal dans une page Web.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    Sous 10.6.x,
    aller dans le panneau "Général" du dialogue Préférences de l'Éditeur Applescript
    puis cocher la case "Afficher le menu des scripts dans la barre des menus".
    --=====
    Save the script as a Script: join_PDFs.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:
    go to the Scripts Menu, choose Numbers, then choose "join_PDFs"
    You may also save the script as an application.
    Then you will be anle to drag an drop PDFs icons on the script one.
    I found the main code in a Web page.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/01/18
    --=====
    on run
    if parle_anglais() then
    set les_fichiers to choose file "Select the PDFs files to merge" of type {"com.adobe.pdf"} with multiple selections allowed without invisibles
    else
    set les_fichiers to choose file "Sélectionner les fichiers PDFs à fusionner" of type {"com.adobe.pdf"} with multiple selections allowed without invisibles
    end if
    my main(les_fichiers)
    end run
    --=====
    on open sel
    my main(sel)
    end open
    --=====
    on main(lesPDFs)
    local p2s, alias_existe, aPath, chemindu_nouveauPDF, les_UNIXs
    set lesPDFs to lesPDFs as list -- just for safe
    set p2s to "" & (path to startup disk)
    tell application "System Events" to set alias_existe to exists disk item (p2s & "joinPDF.py")
    If it doesn't exist, create a symbolic link to a python script
    delivered by Apple in an Automator process.
    if not alias_existe then
    set aPath to quoted form of "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py"
    do shell script "ln -s " & aPath & " joinPDF.py"
    end if
    set chemindu_nouveauPDF to "" & (path to documents folder) & (do shell script "date +_%Y%m%d-%H%M%S") & ".pdf"
    set les_UNIXs to {}
    repeat with i from 1 to count of lesPDFs
    copy quoted form of POSIX path of item i of lesPDFs to end of les_UNIXs
    end repeat
    set les_UNIXs to my recolle(les_UNIXs, space)
    do shell script "./joinPDF.py -o " & quoted form of POSIX path of chemindu_nouveauPDF & space & les_UNIXs
    tell application "Finder" to open file chemindu_nouveauPDF
    end main
    --=====
    on recolle(l, d)
    local oTIDs, t
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set t to l as text
    set AppleScript's text item delimiters to oTIDs
    return t
    end recolle
    --=====
    on parle_anglais()
    return (do shell script "defaults read 'Apple Global Domain' AppleLocale") does not start with "fr_"
    end parle_anglais
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) mardi 18 janvier 2011 12:24:51

  • Scan multiple pages into a single PDF document?

    How can i scan multiple pages into a single multipage PDF file?
    I've seen similar questions posted, but I haven't found any good answers. The only advice i saw was to scan each page as a separate PDF document, then merge them into a single PDF using third-party software.
    Obviously, i don't want to have to do that.
    I can't believe that there really is no way to do it using the existing HP print/scan utilities provided with the hardware.
    My printer/scanner is the "HP Photosmart 5514 e-All-in-One Printer - B111h", and i'm running Vista (64-bit) on an HP Pavillion notebook.
    This question was solved.
    View Solution.

    Hi,
    From the HP Scan software (Start > Programs > HP > HP Photosmart 5510 Series > HP Scan) select PDF and ensure the resolution is 300 DPI or lower.
    Ensure the Show Scan Preview option is checked and click on Scan.
    Once scanning the first page completes, place the next page on the glass and click the plus button below the scan preview...
    Once you are done click on Save.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Inserting pages into a single pdf

    Got a new computer w/ Vista (boo!). Now I am unable to insert additional pages into a basic pdf.
    Example:
    I scan 4 one-page documents onto my computer, which I want to merge into one.
    In the XP version of my Acrobat Reader, I could open "page 1" (or whatever you want to call it), then just scroll down to "insert" from the main menu & browse for the additional pages, as long as I had saved them as PDF's. Done.
    How do I do it now? I don't see "insert" anywhere. Thanks, Rick

    The free Reader has never been capable of inserting or deleting pages; it does very little more than what its name implies: read PDF files. If you could previously insert pages in PDF files, you must have had some version of Acrobat.

  • How to convert a multi page PDF document into a single TIF file?

    Hi!
    We are trying to convert a multi page PDF document into a single TIF file. We are using Adobe Acrobat Standard v 9. Can it be possible?

    I am also looking for feedback.  Although having a PDF copy of a document is wonderful, long term and efficient archival for my workplace is tif or tiff.
    Very frustrating that the PDF to tiff creates a separate tiff file for each page of the multi-page PDF document.  Are there any options or work-arounds?

  • How to merge two A5 pages into a single  A4 page.

    I have three PDF documents that I want to print duplexed onto a single A4 sheet. The first two pages (front and back) are A5 which is causing a problem when printing as it will not allow me to print in booklet format without cropping the back page.
    Is there any way to combine the two A5 pages into a single A4 page within Acrobat??
    I am currently running Acrobat 6.0 Standard on Windows XP SP2

    When you have been around since AA5 and earlier, the printer used to be the trick to doing things. Since AA5 a lot of the features have been built into Acrobat and it might be possible to create the page in another way. However, the print approach should still work.

  • How can i get my HP eney to scan more than one page into a single pdf?

    i want to scan mulitple pages into a single document

    Hello,
    Please click HERE to access the steps that should resolve the issue for Win 7.
    Please click HERE to access the steps that should resolve the issue Win 8.
    Go to section How to scan with HP software  >> How to scan multiple pages into a single file 
    Regards,
    Jabzi
    Give Kudos to say "thanks" by clicking on the "thumps Up icon" .
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Although I am an HP employee, I am speaking for myself and not for HP.

  • HP Envy 4501 won't scan multiple pages into a single document

    My HP Envy 4501 Printer won't let me scan multiple pages into a single pdf document.
    I already made sure that the checkbox "Create a separate file for each scanned page" is not checked under the file section in advanced settings.
    After I scan the first page, I do not get a screen with a + (plus sign) that is supposed to allow you to scan additional pages into the same document.
    Is there any way that I can get a fix/update for my HP Envy 4501 Printer software that would show the screen with the + (plus sign) that allows you to scan additional pages into the same document after you scanned the first page?
    At this point, if I don't get this problem fixed soon, I'm about ready to return my HP Envy 4501 Printer back to the store I bought it from so I can get my money back and buy a printer from one of HP's competitors before my store warranty runs out.
    I am very dissatisfied with HP's printer software, their support services and their web sight that doesn't work half of the time.
    Thanks,
    Mark
    This question was solved.
    View Solution.

    Hi Mark,
    Great to see you are up and running now.
    Such an information is available within the online documentation at hp.com:
    Scanning additional pages is supported at 300 dpi or lower.
    http://support.hp.com/us-en/product/HP-ENVY-4501-e-All-in-One-Printer/5304875/model/5368518/document...
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • How do I copy a document from pages into email (not pdf) and have color and format the same as the document created in pages?

    How do I copy an entire document from pages into email (not pdf) and have color and format the same as the document created in pages?

    Pages ’09 v4.3 and Pages v5.2.2 are entirely different document architectures. Consequently, copying and pasting a table from Pages ’09 circumvents the customary translation process  that would occur if you opened that Pages ’09 document in Pages v5.
    Make a backup copy of the Pages ’09 document that has the table in it, and then open this document in Pages v5.2.2. The table is translated into Pages v5 document format and displayed correctly. You can even select this Pages v5.2.2 table, and then copy/paste it into another Pages v5.2.2 document with accurate results.

  • M276 Unable to scan multiple pages into a single file

    Hi, just bought the Laserjet Pro 200 M276nw, and when I scan multiple-pages documents, it generates one PDF document for each page scanned, but I want this multiple pages into a single PDF file. Anyone can help? Thanks so much

    Yes it's possible.  Use the Image Capture app.  It has an option to scan PDF documents into a single file.

  • How do I merge more than one PDF document into one singular pdf using adobe viewer touch on a microsoft surface?

    How do I merge more than one PDF document into one singular pdf using adobe viewer touch on a microsoft surface?

    Or using the Adobe PDF Pack https://www.acrobat.com/

  • How do I bind multiple PDF Documents into one single document?

    I am trying to bind multiple PDF documents into one single document can anyone please help me?

    You would need Adobe Acrobat to do that. Reader doesn't have the ability.

Maybe you are looking for