Appending with InputFileMode=1

  • We’ve run into an odd issue with the wPDF control. We use the InputFileMode=1 to “append” to an existing PDF. We only make use of the the wPDF control’s DC to generate output. The output file created by wPDF is fine until the length of the existing input file exceeds 357 pages. For example, if our program writes 1 page with an existing input PDF containing 357 pages, the resulting output PDF has the expected 358 pages. But if our program writes 1 page with an input PDF having 358 pages, the resulting PDF contains only the first 260 pages of the input PDF. If our program writes 500 pages with an input PDF 357 pages in length, the resulting PDF contains the expected 857 pages. The filesize of the input PDF does not seem to matter, only the page count. I get the same result if the 358 page input PDF is 20MB in size or if it is only 2MB in size. The size of the resulting PDF file does grow as expected, but the pagecount is wrong.

    Note that the input file was generated by wPDF as well.

    Our software is currently using version 3.77.0.0 of wPDF, testing with version 3.78.0.4 yielded the same results.

    Any Ideas?
    Thanks

    • Offizieller Beitrag

    That InputFileMode is documented to be obsolete.

    It only worked for very simple PDF files at the times when product wPDF started.

    With WPViewPlus we offer a product which can merge multiple PDF files into a new PDF file, delete pages or reorder.
    WPViewPDF Plus can also add watermarks or simple texts, such a page numbering.