Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aaminoff opened this issue Nov 2, 2023 · 6 comments
Closed

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

aaminoff opened this issue Nov 2, 2023 · 6 comments
Labels
bug something not working to spec, or causes crash

Comments

@aaminoff
Copy link

aaminoff commented Nov 2, 2023

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 PhilterPaper added the bug something not working to spec, or causes crash label Nov 3, 2023
@PhilterPaper
Copy link
Owner

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

@aaminoff
Copy link
Author

aaminoff commented Nov 3, 2023

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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

@aaminoff
Copy link
Author

aaminoff commented Dec 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something not working to spec, or causes crash
Projects
None yet
Development

No branches or pull requests

2 participants