Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.

9 replies

Legend
September 29, 2016

Sorry, no. I may be able to help explain anything unclear in the API documentation though.

Translate
Legend
September 29, 2016

Ok, even excluding forms there are many ways to approach this. Choices include:

* Add a page then add text; or create a new PDF and insert it

* Add text as "real" text or as annotation (NB annotations may be excluded from printing)

* Use JavaScript API or other API

Here are two possible approaches

1. Use the JavaScript API through the VB bridge to insert a page and add annotation text.

2. Create a new PDF by printing text and other graphical elements to the Adobe PDF printer, and then insert the new PDF using the technology already in use.

Translate
September 29, 2016

Can you please point me to any samples?

Thanks

Translate
Legend
September 29, 2016

Thanks. Are you working with filled in forms?

Translate
September 29, 2016

No

Translate
Legend
September 29, 2016

Ok, I assume you have Acrobat Pro and have downloaded and installed the Acrobat SDK.

You say "merged PDF". Does that mean you are already using an API to merge or combine PDF files? What sort of API/approach are you using? Is it with filled in forms?

Translate
September 29, 2016

yes i do have Acrobat Pro and below is my code

Merge part
           
                Type pdfType = Type.GetTypeFromProgID("AcroExch.PDDoc");
                dynamic doc2 = Activator.CreateInstance(pdfType);
                AcroPDDoc doc3 = new AcroPDDoc();
                doc2.Open(file);
                outputDocument.InsertPages(outputDocument.GetNumPages() - 1, doc2, 0, doc2.GetNumPages(), PDDocFlags.PDDocIsOptimized.GetHashCode());
                doc2.Close();
          

            return outputDocument;
      

and save part:

outputDocument.Save(Convert.ToInt16(PDSaveFlags.PDSaveFull) + Convert.ToInt16(PDSaveFlags.PDSaveCollectGarbage) + Convert.ToInt16(PDSaveFlags.PDSaveLinearized), Path.GetFullPath(newPath));

Thanks

Translate
Legend
September 28, 2016

Is this for use on a server?

Translate
September 29, 2016

No, in my local machine

Translate