v1.0.0 Beta
See original GitHub issue@jerp @gregbacchus @mlecoq @kevinswartz @Jonathan-Mckenzie @philipjmurphy @DanielJackson-Oslo @matthopson @ithillel-aminev @vitaly-zdanevich
Hello everybody! Today I’m excited to announce the beta release of pdf-lib
v1.0.0!
You have all provided extremely valuable feedback on pdf-lib
over the past year. This feedback has highlighted several architectural flaws in the design of pdf-lib
(e.g. the inability to load invalid PDFs). It has also brought to my attention some critical shortcomings in pdf-lib
’s feature set (e.g. no methods for getting the width/height of a page).
I’ve responded to these issues with specific workarounds and fixes as they’ve been reported. But I’ve also been thinking about how to solve them in a more wholistic way.
With this goal in mind, I’ve been hard at work these past few months working on a complete rewrite of pdf-lib
. This rewrite is now mostly complete. All that remains is to write documentation and implement a few small features.
I’d like to ask for your help in beta testing this rewrite. I’ve written extensive automated and manual tests, and have verified that everything works in all major PDF readers (Acrobat, Foxit, Preview) and browsers (Chrome, Firefox, Safari). But since this rewrite is so extensive, I do not want to do a full release until others have been able to test it.
I’m working on a complete changelog, but it might be a week or two until I am able to complete it. So, in the meantime, here’s a list of the main changes/improvements in v1.0.0:
- A new high level API
- Much faster parser
- More robust parser
- Smaller bundle size (you must now opt-in to using fontkit if you use custom fonts)
- Better handling of encrypted documents
- Improved automated test coverage
- Improved manual test coverage
The README for the rewrite can be found here: https://github.com/Hopding/pdf-lib/tree/Rewrite.
You can install the beta version of v1.0.0 with npm
:
npm install --save pdf-lib@beta
or yarn
:
yarn add pdf-lib@beta
It’s also available on the unpkg CDN:
Those of you that intend to participate in this beta test, please post a comment in this thread to let me know! If you do not plan to participate, please just ignore this (I understand that not everybody will be able to participate).
I’d like to keep all issues and discussion pertaining to the beta test centralized in this thread. However, if you need to communicate privately with me, please feel free to email me at andrew.dillon.j@gmail.com
.
I appreciate your help and am looking forward to a successful release of v1.0.0!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:32 (20 by maintainers)
Hello again everybody! I’ve just finished creating a project site for pdf-lib: https://pdf-lib.js.org/. This site also includes API docs for v1.0.0: https://pdf-lib.js.org/docs/api/ (this should be of interest to you @thommath). I’d greatly appreciate everybody’s feedback on the site and the API docs.
Also, I’m planning to close out the beta test in a week or so unless any issues are discovered. Once I close out beta, I’ll switch the
master
branch to trackRewrite
and cut the official v1.0.0 release! Thanks again to everybody for helping test things out.@cjblb19 It sounds like you are having two distinct issues:
mergedPdf
only contains a single blank pageIs this summary correct?
I looked at the PDF file you shared, and it is actually encrypted. You can verify this with Acrobat Reader:
This is understandably confusing. After all, how can a document be encrypted if you’re able to open it in your browser without entering a password? You can do this because the PDF specification actually defines a default password:
This default password is what Chrome (and other readers) use to decrypt the PDF - thus allowing you to view an encrypted PDF without entering a password.
Encrypted documents are one of
pdf-lib
’s weak points. It turns out that there are a lot more encrypted PDFs out there than you might think. But you’d never know, because many of them use this default password. Support for PDF decryption is high on my list of features/enhancements. However, I do not plan to include it in the v1.0.0 release.If anybody would like to work with me to help add support for PDF decryption to
pdf-lib
, I’d greatly appreciate it! There’s lots of work that can be done to makepdf-lib
even better than it already is. But the pace of feature development currently depends primarily on how much time I have available to devote to it.