Merging PDF / Page Numbers / Acrobat SDK V9  & LiveCycle

Hello everyone,
I use Adobe LiveCycle to create forms, Visual Studio 2005 and the Acrobat SDK for the application I'm programming to fill in these forms. The application fills in the forms and merges them with no issues.
The problem I have is that these pages have page numbers in the upper right. I use the Page N of M object on these forms in LiveCycle. PDF page numbers are filled in correctly when filling in the forms, but when I merge PDFs, the pages keep their original page numbers. I've looked at the Windows - Interapplication Communications even using templates to no avail.
How can I merge these pdf's and have my program renumber these pages correctly and how can insert pages anywhere I want in the merge document?
Below is the code I use to merge the PDF's. It was posted in a forum.
Sub MergePDF(ByVal ThePath As String, ByVal outFileName As String)
On Error GoTo serror
Dim dPDDocMerge As New Acrobat.AcroPDDoc
Dim dPDDoc As New Acrobat.AcroPDDoc
Dim strFiles() As String
Dim numPage As Integer
Dim TotalPage As Integer
Dim objThisFile As IO.FileInfo 'get FileInfo object for file string
strFiles = System.IO.Directory.GetFiles(ThePath) ' Read in the file names
Dim b As Boolean ' mostly for testing purposes... could use it for error 'checking to make sure that a file is really added before deleleting it...
For i As Integer = 0 To strFiles.Length - 1 ' run through all the files in 'the directory
objThisFile = New IO.FileInfo(strFiles(i)) ' Get the extension
If objThisFile.Extension = ".pdf" Then ' Only add in PDFs
If dPDDocMerge.GetFileName = "" Then ' check if it's the first file
dPDDocMerge = New Acrobat.AcroPDDoc
b = dPDDocMerge.Open(strFiles(i)) ' open first file
TotalPage = dPDDocMerge.GetNumPages
Else
dPDDoc = New Acrobat.AcroPDDoc
b = dPDDoc.Open(strFiles(i)) ' open other files
numPage = dPDDocMerge.GetNumPages ' get the page count
TotalPage += numPage
b = dPDDocMerge.InsertPages(numPage - 1, dPDDoc, 0, dPDDoc.GetNumPages, _ False) ' Insert
End If
End If
Next
'b = dPDDocMerge.Save(1, ThePath & "\" & outFileName) ' save file
b = dPDDocMerge.Save(1, ThePath & "\" & "\MyTest.PDF") ' save file
b = dPDDocMerge.Close()
Exit Sub
serror:
MsgBox(ErrorToString)
End Sub
Thanks for any code or advice.

You can't merge LiveCycle forms this way :(. LC forms are NOT standard PDF files and can't be processed in the same way.

Similar Messages

  • Create pdf using Adobe acrobat sdk

    Hello,
    I'm new to this concept of using adobe sdk to convert a html into pdf.I would like to know few details regarding this..
    I went thorugh the documentation but I did not get any help about the vector image support in the pdf and I aslo want to know abot the dpi support in the pdf.
    I also want to know wether I can create a pdf form a Html page.
    thanks for the help.

    >I want this to be on the server.
    Ok, we can start there - or stop. The Acrobat SDK is for automating
    Acrobat. Acrobat must not be installed on a server. So you cannot use
    Acrobat.
    Adobe have a PDF Library, which can be licensed for server use. But it
    does not have any easy HTML to PDF converter.
    You might look into LiveCycle PDF Generator, a different application
    with a Java API and more, for server use.
    >The dpi what I was talking about was..in the pdf i want a logo to appear that would around 200-300 dpi.That logo is a vector image.
    This seems a contradiction. PDF files can store text, vector images
    and bitmaps/images. If you store a vector image, it remains vector and
    there is no dpi to worry about.
    HOWEVER if you can only convert HTML
    1. HTML does not support any vector formats
    2. HTML often forces images to 72 dpi.
    HTML is not suitable for print quality.
    Aandi Inston

  • I have installed Acrobat X PRO; Not able to add page Numbers, Acrobat Crashes.

    These are the steps that i follow,
    1) Group all the MS word files in one folder.
    2) combine files into Pdf
    3) From Tools, select Header and Footer and try to insert page numbers of the format (Page 1 of n)
    4) And adjust some header footer values,
    5) Select start the page numbering from page 2.
    6) Click OK -> Acrobat Pro hangs and then crashes.
    This happens everytime i try to do it. Please Help.
    I use Windows 7 SP1. Please let know if you need any other details.

    First, make sure you all the latest updates for Acrobat X. Next, try temporarily turning off Enhanced security under Edit > Preferences > Security (Enhanced) to see if this might be interfering with something.

  • Merge issue : page numbering

    hi all,
    does anybody know how to add "total pages" after merging pdf documents
    adding "page <?>" works fine
    in other words , i need to add at the bottom of the merge document
    "page <?> from <total pages>"
    ---- code sample ---
    the code provide only page number
    // Initialize PDFDocMerger
    PDFDocMerger docMerger = new PDFDocMerger(inputStreams, outputStream);
    // Calls several methods to specify Page Number
    // Calling setPageNumberCoordinates() method is necessary toset Page Numbering
    // Please refer to javadoc for more information
    docMerger.setPageNumberCoordinates(300, 20);
    // If this method is not called, then the default font"(Helvetica, 8)" is used.
    docMerger.setPageNumberFontInfo("Courier", 8);
    // If this method is not called, then the default initial value "(1, 1)" is
    used.
    docMerger.setPageNumberValue(1, 1);
    // Merge PDF Documents and generates new PDF Document
    docMerger.mergePDFDocs();
    thanks
    yuval

    Hi,
    Did you find any solution to your problem. Even I have the same requirement.
    Regards,
    saq

  • Logical page numbering in SDK

    Hi
    Does somebody know of a way to retrieve the logical page numbering of a page in the SDK? I'm using the IAC OLE interface in VBA for Excel, and I'd ideally like to go to the page specified by it's logical page number (section numbering), something like:
    Set AView = AcroAVDoc.GetAVPageView()
    AView.GoTo("1-13")
    However the only option appears to be to supply the page's absolute number to the GoTo function. I'm not afraid of using another interface if its available to me, but from all my research I can't turn up anything describing what I'd like. From what I can see, logical numbering only exists in the Acrobat application.
    Sombody asked a similar question in another forum but it wasn't answered, I'm hoping this is a better place for it:
    http://forums.adobe.com/thread/507321
    Thanks in anticipation, Andrew

    Actually I can get the page labels (logical numbers) using the JSObject interface getPageLabel function on the document, then open to the absolute page number. This way it looks like the hyperlinks are going to the logical page numbers.

  • Word to PDF - Page Numbering Problems

    When I use the combine files tool in Acrobat 8 for PDFing word documents instead of the page numbering being 1/3, 2/3, 3/3, it comes out as 1/1, 2/2, 3/3. I've tried looking at all the settings and cant find a logical reason for this. It also happens when I print to PDF while in Word.
    Has anyone else experienced this same problem?

    Here are a couple links that should help.
    http://www.mvps.org/word/FAQs/AppErrors/PageXofY.htm and
    http://www.mvps.org/word/FAQs/Numbering/PageNumbering.htm
    Regards,
    Dave

  • RoboHELP to PDF Page numbering issue

    HI,
    I am experiencing a problem related to page numbers in the pdf generated through the RoboHELP source files. Hereby I am giving some images of the initial pages of the PDF, in which I have clearly explained the issue. I have removed the content and images related to our project. Please let me know, how I can overcome this issue.
    NOTE: The page numbering issue was not there earlier.  I have imported two frame maker files. Then I was not able to generate a PDF. That particular FM file had a table. Read in the Adobe forum that some type of tables may affect the generation of PDF. Hence, I have deleted the FM files. Since then I am facing the page numbering issue.
    Here are the images with my explanation of the issue:
    The following is an image of the pdf. This is actually the fourth page of the pdf, but it is numbered as xiv.
    The next pae is numbered as xv. Again the numbering reverted back to xiv as shown in the following iamge.
    Immeditely after the TOC, the 1st page is numbered as 115.
    Again every 1st page of a chapter is starting as page number 115
    The 2nd page of every chapter is numbered as 126.
    The 3rd page of every chapter is numbered as 125.
    The fourth page again numbered as 126 followed by 125, which is continuing till end of the chapter.
    Please let me know how this issue can be solved.

    I am not sure what is causing this but can suggest a workaround. Instead of publishing direct to PDF, create a Word document only. That may have page numbering issues but there you should be able to correct them. Then publish your PDF from Word.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How [Insert|Add] Image into Opening PDF file with Acrobat SDK.

    Hi Guys,
    I'm trying to insert|add image file into opening PDF file with specified location (X|Y) and scale (Width|Hight) but got many of troubles
    If use third party like iTextSharp or something else thing become simple but i want to use Acrobat SDK to do this
    Any suggestion or idea?
    Any help appreciated.

    Thank for your interested.
    I use VB.NET and Acrobat
    Here is some my code:
    Try
       If File.Exists(T(0)) Then
       Dim AcroAVDoc As AcroAVDoc = Ap.GetActiveDoc
       Dim AcroPDDoc As AcroPDDoc = AcroAVDoc.GetPDDoc
       Dim AcroPDPage As Acrobat.AcroPDPage = AcroPDDoc.AcquirePage(Integer.Parse(T(3)))
       Dim data() As String = T(1).Split("^")
       Dim imgX = data(0)
       Dim imgY = data(1)
       Dim imgWidth = data(3)
       Dim imgHight = data(4)
       'TODO: insert into opening PDF file
       Return 1
       End If
       Catch ex As Exception
       End Try
    I don not know what to do next to insert an image (JPEG, PNG, ..) into PDF file.
    Can you show me or suggest some solution, idea?
    Thank in advance.

  • Translate the entire web page as a single pdf page in Acrobat X

      Acrobat X has changed the way it interprets web pages. With acrobat 7 and 8, it would translate the entire web page as a single pdf page. With Acrobat X the calculation is gone. Is there a fix or work around this?

    Old Fox....thanks so much. I do not have the HP smart web printing in my add ons or plug ins. I used SWP in my problem posting and should have spelled out HP smart web printing..sorry.
    The NAME of the printer showed 'document converter'. WELL DUH! That was the problem all along. I have no idea how it got changed but I won't dwell on it. I have never had to look at those 'choices' because I don't need to change anything when I print but its never too late to learn.
    I am so happy and thanks again
    Terri

  • Merge pdf page

    Hi everyone !
    I would like to merge pdf documents : I have a client who wants to send a PDF to several people. Each person puts his annotations (like comments) into the document.
    Then, I get all pdf (always the same, with several comments) and merge it in one PDF with all comments.
    I thought I was able to do it with a simple DDX file, but I can't find a way to do it !
    How can I do it ?
    Thank's for your help !
    FYI, the configuration is : LiveCycle ES + Reader Extensions (I don't think that's help).
    (I hope I post in the right place to ask this.)

    I find a way to do this, but I still have a problem : some comments which are near the same position in 2 or more PDF are not displayed nor assembled. To be exact, only one of them are kept in the output file.
    Have you any idea how to solve this ?
    Thanks for your help !
    FYI, this is how i assemble them :
    <Comments result="allComments.xfdf" format="XFDF">
         <PDF source="doc2" />
         <PDF source="doc3" />
    </Comments>
    <PDF result="output.pdf" save="FastWebView">
         <PDF source="doc1" />
         <Comments source="allComments.xfdf" />
    </PDF>

  • How do I compress PDF files using Acrobat SDK?

    have a web service created in a .net environment that examines existing pdf files in a staging directory prior to sending them over the wire using FTP.
    Part of that process requires that I rename individual files in order to associate them with a particular batch.
    I also have a requirement to reduce the size of individual files as much as possible in order to reduce the traffic going over the line.
    So far I have managed about a 30% compression rate by using an open source library (iTextSharp).
    I  am hoping that I can get a better compression rate using the Acrobat SDK, but I need someone to show me how, hopefully with an example that I can follow.
    The following code snippet is a model I wrote that accomplishes the rename and file compression...
                const string filePrefix = "19512-";
                string[] fileArray = Directory.GetFiles(@"c:\temp");
                foreach (var pdffile in fileArray) {
                    string[] filePath = pdffile.Split('\\');
                    var newFile = filePath[0] + '\\' + filePath[1] + '\\' + filePrefix + filePath[2];               
                    var reader = new PdfReader(pdffile);
                    var stamper = new PdfStamper(reader, new FileStream(newFile, FileMode.Create), PdfWriter.VERSION_1_5);
                    int pageNum = 1;
                    for (int i = 1; i <= pageNum; i++) {
                        reader.SetPageContent(i, reader.GetPageContent(i), PdfStream.BEST_COMPRESSION);
                    stamper.Writer.CompressionLevel = PdfStream.BEST_COMPRESSION;
                    stamper.FormFlattening = true;
                    stamper.SetFullCompression();
                    stamper.Close();
    Any assistance is appreciated.

    You can't use Adobe Acrobat on a server.

  • Reader 11 pdf page numbers printing too high

    After I upgraded to Adobe Reader 11, I have started having issues with page numbers on my pdf forms printing too high on the page. Instead of printing at the bottom of the page, they jump up to wherever the text on the page stops. For instance, if the text stops half way down the page, the page number prints one line beneath that text, so it's in the middle of the page instead of the bottom corner. The file looks fine on the screen, and if I print it in Reader 10 on another computer, it prints at the bottom of the page where it belongs. I've compared settings between my computer, and the computer where the file prints correctly, and I can't find any settings that are different. Has anyone else had this problem? And if so, suggestions for a solution?

    looking again, it prints badly in Chrome, Safari, pdf, preview but NOT Firefox.
    And, I was wrong about Gmail. it prints wrong from gmail, too.

  • Acrobat 8.1 - PDF page numbers different to MS-Word

    Hello
    I have a 120 page MS Word (ver 2003) document. When I convert it to a PDF using Acrobat 8.1, I get a document which is 114 pages. According to Tech Support doc 329296 ("Text reflows into more or fewer pages when you convert a file to PDF") I need to make the PDF writer the default printer.
    Although this solves the issue, I use another printer as my default. Is it not possible to get the PDF output to match the Word file without having to substitute default printers?
    Thanks.
    Farrukh Hyder

    There is no Writer anymore, it went away after AA5. However, WORD would do something similar with Writer also. WORD is the issue here, not Acrobat. WORD ALWAYS reflows the document to best match the selected printer. Frame Maker and other layout programs do not do this reflow and that is why Mike recommended Publisher.
    I understand there is an option in WORD to have it not do the reflow (though that may give a less that desired output). Unfortunately I can not find it in WORD 2007, so I might be wrong.
    This feature is characteristic of most work processors. To avoid it, companies developed layout programs such as FM and Pub.
    To set up your document, go to the print menu and select the Adobe PDF printer. Then go back through your document and adjust the pages and such. That should give you a PDF result that is consistent with what you see.

  • Print PDF file using Acrobat SDK - Warning message

    Hello,
    We are trying to create automatic program in c# that will print all pdf files located in a specific folder, using Adobe Acrobat 9.0 SDK.
    Whenever the application tries to print file, we receive a warning message ("WARNING! A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?").
    If we press yes, the file is printed, but next time we'll run the application, this message will appear again.
    Since this application supposed to run automatically (with no interaction with the end users), we want to prevent this warning message from appearing.
    How can we eliminate this warning message?
    Is there any other way to print PDF files using Adobe Acrobat from another application?
    Thanks,
    Lilach.

    joeln3:  I believe the original post refers to a client application, not a web page.  Why use JavaScript from within a client application?  I understood their use case to involve a client app referencing the PDF Library, loading various PDF files, and using one (or more) of the PDF Library's Print methods to invoke Acrobat's internal print routines.
    Dave

  • To access bookmarks in pdf doc using acrobat sdk with C#

    Hi, I am converting a word doc to PDF. While doing this the headlines in word doc are getting converted to bookmarks in PDF & I get a bookmark tree. I want the bookmarks to be collapsed. I am using acrobat dll to convert word doc to pdf. Want to use the same to collapse the bookmarks.
    Any help would be appreciated.
    Thanks & Regards,
    Lalit

    Hi Irosenth,
    If we have Acrobat installed on our m/c in Micorsoft office word I get an "Acrobat" tab. In that I get an option to create "PDF" from word.
    So keeping this in mind I created a  project in C# using VS 2008. In this project I took the reference of "Acrobat.dll" the com library.
    Using the reference of this library I converted the word/excel/ppt docs to PDF.
    Below is the code snippet :
    public 
    void startConversion(string docFile, string pdfFile){
    Acrobat.
    AcroAVDocClass _acroDoc = new Acrobat.AcroAVDocClass();Acrobat.
    AcroPDDoc _pdDoc = null; 
    string strNonPDFFile = docFile; 
    string strPDFFile = pdfFile; 
    _acroDoc.Open(strNonPDFFile, strPDFFile);
    _pdDoc = (Acrobat.
    AcroPDDoc)(_acroDoc.GetPDDoc());
    _pdDoc.Save(
    Convert.ToInt16(Acrobat.PDSaveFlags.PDSaveFull), strPDFFile); 
    _pdDoc.Close();
    _pdDoc =
    null;_acroDoc.Close(1);
    _acroDoc =
    null;}
    This does convert Word/exce/ppt to pdf successfully. But I wanted to get access to the bookmarks of the PDF file....
    Any help would be appreciated.
    Thanks & Regards,
    Lalit

Maybe you are looking for

  • Connecting to SQl server ( MS acess front end) and pull the data into BI

    Dear all, i need to extract the data from SQl server ( MS acess front end) and pull the data into BI . i need to know what are the steps need to follow on this.. can any one help me on this...! Thanks, Siva

  • Office live states I don't have firefox or explorer but I do. Can't get into my site to make changes because of this

    My web site is hosted in office live small business. Recently something changed and now I get a message when I try to log in that I must have Explorer or firefox to use the site. I have both but they are not being recognized by office live. I have co

  • Good coding practice for object init

    We have a code that requires initializing instance of the object for each item in the loop. I have following option in mind. Please advice which one is the best option. TIA Option 1 ======= public class AThread extends Thread { private ObjectA var1 =

  • Adding sounds to Dreamweaver Spry Menus

    Is there a way to add custom audio sounds to the spry menu so that when someone visits the website and puts their cursor over the menu item they can hear a custom audio play?

  • HR Triggers

    Dear Experts, Can you help in understanding difference between below two HR Trigger rules; 1) Infotype  Subtype       Field         Operator     Value         and,or,not 0000     IR               MASSN        <>           $MASSN       OR 0000      10