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

9 replies

Legend
Sep 29, 2016 11:37 AM UTC

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

Translate
Legend
Sep 29, 2016 11:29 AM UTC

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
Sep 29, 2016 11:36 AM UTC

Can you please point me to any samples?

Thanks

Translate
Legend
Sep 29, 2016 11:09 AM UTC

Thanks. Are you working with filled in forms?

Translate
Sep 29, 2016 11:20 AM UTC

No

Translate
Legend
Sep 29, 2016 9:38 AM UTC

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
Sep 29, 2016 11:06 AM UTC

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
Sep 28, 2016 2:54 PM UTC

Is this for use on a server?

Translate
Sep 29, 2016 8:28 AM UTC

No, in my local machine

Translate