Any one has encountered error like below for a pdf encryption:-
(exit) an exception was raised:
2020-11-02T23:16:20.453666662Z ** (RuntimeError) integer out of range converting 4294967295 from a 8-byte signed type to a 4-byte signed type
2020-11-02T23:16:20.453669462Z
2020-11-02T23:16:20.453671862Z (my_future_now 4.0.0) lib/my_future_now/services/encrypt_pdf_service.ex:61: MyFutureNow.EncryptPdfService.encrypt_pdf!/3
2020-11-02T23:16:20.453674663Z (my_future_now 4.0.0) lib/my_future_now/services/encrypt_pdf_service.ex:20: MyFutureNow.EncryptPdfService.encrypt_and_write_file!/2
2020-11-02T23:16:20.453677463Z (my_future_now 4.0.0) lib/my_future_now_web/email/loa_email.ex:90: MyFutureNowWeb.LOAEmail.employer_encrypted_loa_parts/1
2020-11-02T23:16:20.453680163Z (my_future_now 4.0.0) lib/my_future_now_web/email/loa_email.ex:353: MyFutureNowWeb.LOAEmail.loa_email_to_employer/2
This post is the first time I’ve ever seen qpdf, so I can’t really say what the problem is.
Skimming the changelog on that repo doesn’t show any obvious “fix this exact bug” entries since 9.1.1, but it likely wouldn’t hurt to upgrade.
The next lead I’d recommend you follow is that value 4294967295 - where does it appear in the input? Does qpdf give a different error for a different input file?
Edit to add: 4294967295 is 0xFFFF_FFFF, which is what you’d get if code mistakenly interpreted a 4-byte signed -1 as a 4-byte unsigned value - not sure if that’s significant.