Merge Documents

Hello,

I have a requirement to merge multiple documents into a PDF document, the documents to be merged include "xls, docx, pdf"

XLS+DOCX+PDF(s) -> Single PDF Document (one)

I have seen plugin from James Carter (PDF Tools), but i would like to know if it merges XLS + DOCX as well.

Thanks
Naveen

OriginalPostID-262601

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    @naveena113 I agree with @christineh, however if this does not fulfills your requirement then you can follow the below mention Steps:

    1. Create a Smart Service which can convert xls to PDF using iText and Apache POI API
    2. Use this smart service to store the returned Document of type PDF
    3. Use DocsToPDF smart service to convert the docx file and capture it's returned document
    4. Use Merge PDF Smart Service by passing these all there PDF document as an array to it's input, which will return you a single PDF



    here the most challenging part could be Creating a Custom Smart Service mention at Step-1
    You need to download following jar files to build to make this work

    ======================================================
    dom4j-1.6.1.jar
    itextpdf-5.4.0.jar
    log4j-1.2.17.jar
    poi-3.9.jar
    poi-ooxml-3.5-beta5.jar
    poi-ooxml-3.6-20100309.jar
    poi-ooxml-schemas-3.7-beta1.jar
    xmlbeans-2.5.0.jar
    xmlbeans-xmlpublic-2.4.0.jar
    =====================================================

    And then follow the attached Java code and convert the code according to your requirement.
    Also attached the output of the attached Java file, which is generating Excel to PDF successfully.

    Hope this will help you to build the Smart Service Successfully.


    ExcelToPDF.java

Reply
  • 0
    Certified Lead Developer
    @naveena113 I agree with @christineh, however if this does not fulfills your requirement then you can follow the below mention Steps:

    1. Create a Smart Service which can convert xls to PDF using iText and Apache POI API
    2. Use this smart service to store the returned Document of type PDF
    3. Use DocsToPDF smart service to convert the docx file and capture it's returned document
    4. Use Merge PDF Smart Service by passing these all there PDF document as an array to it's input, which will return you a single PDF



    here the most challenging part could be Creating a Custom Smart Service mention at Step-1
    You need to download following jar files to build to make this work

    ======================================================
    dom4j-1.6.1.jar
    itextpdf-5.4.0.jar
    log4j-1.2.17.jar
    poi-3.9.jar
    poi-ooxml-3.5-beta5.jar
    poi-ooxml-3.6-20100309.jar
    poi-ooxml-schemas-3.7-beta1.jar
    xmlbeans-2.5.0.jar
    xmlbeans-xmlpublic-2.4.0.jar
    =====================================================

    And then follow the attached Java code and convert the code according to your requirement.
    Also attached the output of the attached Java file, which is generating Excel to PDF successfully.

    Hope this will help you to build the Smart Service Successfully.


    ExcelToPDF.java

Children
No Data