PhilterPaper / Perl-PDF-Builder

Extended version of the popular PDF::API2 Perl-based PDF library for creating, reading, and modifying PDF documents
https://www.catskilltech.com/FreeSW/product/PDF%2DBuilder/title/PDF%3A%3ABuilder/freeSW_full
Other
6 stars 7 forks source link

->page(1) sometimes inserts a new page in the wrong place #203

Closed aaminoff closed 8 months ago

aaminoff commented 8 months ago

We use PDF::API2 to add the first two pages of working papers that come in to us from elsewhere. With versions of PDF::API2 after 2.006 and with PDF::Builder, not for every incoming PDF, but about 20% of them, calling $pdf->page(1) puts in the new page around page 9 instead of before the first page.

I have a sample PDF that we can reproduce the problem with, and a minimal script that reproduces the problem here:

https://back.nber.org/sys-admin/pdfbug/

PhilterPaper commented 8 months ago

I have been able to duplicate the problem, and am looking at it.

aaminoff commented 8 months ago

Thank you! If you would like a copy of the PDF::API2 version 2.006 that does not have the bug I can get that to you.

If you are ever in the Boston area please let us know, we will treat you to lunch.

PhilterPaper commented 8 months ago

Thanks for the offers, but 2.006 is so old I'm not sure I can get any useful information from it. I'll keep your offer in mind just in case, as it doesn't seem to be available online! Just API2.pm would probably be enough. As for lunch, once I get you a satisfactorily fixed version, I'll think about taking you up on that if I get over to eastern MA from eastern NY at some point (or vice-versa if you're over this way!).

PhilterPaper commented 8 months ago

Good news and bad news. The good news is that the bug is fixed and in GitHub (and the next CPAN release, 3.026, later this year). The bad news is that @vadim-160102 Vadim Repin (? he has changed his GH ID, so I'm not positive it's the same guy) beat me to the punch in finding the error and fixing it. Therefore, he gets the lunch. :-( From the name and an old email he used, he may be in Russia, so logistics of feeding him may be complicated!

PhilterPaper commented 6 months ago

By the way, 3.026 was released a few days ago, with this fix in it.

aaminoff commented 6 months ago

Thanks again! I will install that on the new Linux root I am working on.

On 12/13/23 22:25, Phil Perry wrote:

By the way, 3.026 was released a few days ago, with this fix in it.

— Reply to this email directly, view it on GitHub https://github.com/PhilterPaper/Perl-PDF-Builder/issues/203#issuecomment-1855064536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIIT33ZDVZF355Z7XIKOVLYJJWSVAVCNFSM6AAAAAA63RBIDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJVGA3DINJTGY. You are receiving this because you authored the thread.Message ID: @.***>