Appending pages to a pdf

  • In order to append new pages to an existing pdf file, i use the property InputfileMode = pwAppendToInput but the size of the resulting file grows by two for each page that i append to the output file. Is this a bug or somebody can explain me the correct way of how to append a new page to an existing file.

    Thanks in advance

  • Hi,

    From DLL version 2.5.3.3 there is the problem in the size of appended files.
    (used not to be there in 2.5.0.0 and before that version)

    Delphi 5 code I used to test:

    WPDF_Start('ID Data','**deleted for security reasons**');
    wppdfprinter1.filename:='c:\testsize.pdf';
    wppdfprinter1.inputfile:='c:\testsize.pdf';
    wppdfprinter1.InputfileMode:=pwAppendtoInput;

    wppdfprinter1.BeginDoc;
    wppdfprinter1.StartPage( Round( 21/2.54*res), Round(29.7/2.54*res), res,
    res, 0);
    wppdfprinter1.Canvas.TextOut(100,100,'AAAAAAAAAAAAAAAAAAA');
    wppdfprinter1.EndPage;
    wppdfprinter1.EndDoc;

    The size of the file approximately doubles every time you append one page.

    1 page 4kB,
    2 pages 7kB
    3 pages 17kB
    4 pages 33kB
    5 pages 67kB
    6 pages 133kB and so on.

    I also tried to have the filename and input file different, and then
    swap them every time I run the program but the same happens here.

    This was not the case with DLL version 2.5.0.0

    What has changed, or what am I doing wrong?

    Cheers,

    Hans