Skip to main content
September 8, 2016
Question

C#.Net Library to Merge and optimize Pdf

  • September 8, 2016
  • 3 replies
  • 7138 views

Hi,

i am looking for C#.Net library to merge set of pdf files and save them optimized, i am already holding license for Acrobat Pro DC

Please provide me any documents for the same

Thanks

This topic has been closed for replies.

3 replies

Ralph_Brock
Participant
July 3, 2018

You should use zetpdf.com. By using it you can merge and optimize your PDF more easily.

September 8, 2016

trying below code which compiles but never save pdf to output folder

//Append Document

private AcroPDDoc OpenFileForCopy(string file, AcroPDDoc outputDocument)

{

    if (isFirstFile)

    {

        outputDocument = new AcroPDDoc();

        outputDocument.Open(file);

    }

    else {

        AcroPDDoc doc2 = new AcroPDDoc();

        doc2.Open(file);

        outputDocument.InsertPages(outputDocument.GetNumPages(), doc2, 0, doc2.GetNumPages(), PDDocFlags.PDDocIsOptimized.GetHashCode());

    }

    return outputDocument;


}

//Save Doucment

private string[] SavePDF(AcroPDDoc outputDocument, string path, string source)


{
    string[] result = new string[2];

    string newPath = path + "_" + "Merged";

  

    Directory.CreateDirectory(newPath);

    newPath += "\\Stmt" + source +  ".pdf";

    outputDocument.Save(Convert.ToInt16(PDSaveFlags.PDSaveFull)

        , newPath);

    isFirstFile = true;

 


    fileCount = 0;

   return result;

}

Bernd Alheit
Community Expert
Community Expert
September 8, 2016
September 8, 2016

Thanks for you time, I already looked in to it, not within our budget

Legend
September 8, 2016

It may be your only Adobe option if you want to run on a server. Do you? Acrobat cannot be used on a server or background or automatic process.