rameshsharma
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
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
kokolegorille
You should describe what You are doing, with which tools… like this it’s hard to have any idea.
rameshsharma
We are using
QPDF (PDF document processing)
We use qpdf for encrypting (password protecting) PDFs.
Below is the code for encrypting pdf:-
rameshsharma
rameshsharma
The error logs says that the encryption is breaking, not sure where and why
(RuntimeError) integer out of range converting 4294967295 from a 8-byte signed type to a 4-byte signed type
al2o3cr
RuntimeErroris whatraiseproduces; based on the stacktrace I’d guess{err, _} -> ...is on line 61.qpdfis returning that message from deep in a utility function, unfortunately:https://github.com/qpdf/qpdf/blob/232f5fc9f3bed8e1b02bca5d10b2eca444e30f95/include/qpdf/QIntC.hh#L72-L75
rameshsharma
QPDF_VERSION=9.1.1 is used by us.
Will a upgrade of the version help. How to fix the issue any idea?
al2o3cr
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? Doesqpdfgive a different error for a different input file?Edit to add:
4294967295is0xFFFF_FFFF, which is what you’d get if code mistakenly interpreted a 4-byte signed-1as a 4-byte unsigned value - not sure if that’s significant.ku1ik
integer out of range converting 4294967295 from a 8-byte signed type to a 4-byte signed typeis a bug in qpdf <= 1.0.4. See here https://www.gitmemory.com/issue/qpdf/qpdf/482/721737907I had the same, upgraded qpdf to 1.0.4 and I confirm it works (also tested qpdf 1.1.0, works too).