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

Support for PDF 2.0+ #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Support for PDF 2.0+ #25

wants to merge 4 commits into from

Conversation

rausm
Copy link

@rausm rausm commented Nov 19, 2018

In case it's not obvious, for now PDF with version 2.0 will not work, as iText uses just last char/digit from the version, and so the PDF is considered 1.0. Since we won't need to update past PDF-1.7, it should suffice until something other breaks ;-)

NB:

  • Hand-picked changes from my version (which I forked around 1.5.1 and, sadly, let diverge; contains a few changes no-one would ever want, so "just sending all the changes" was not possible).
  • Had to patch iText a bit (to get at the version number)
  • I hate Java with a vengence and only use it in direst cases of self-defence, it might show.
  • Haven't tried to compile "the standard way" (I use IntelliJ "Build Artifact" to compile mine version into one giantic .jar).
  • Hopefully should "just work"(tm).

PS: I also integrated (into my version) IcePdf for preview (manages to correctly preview a lot of PDF's, SUPPORTS ZOOMED rendering !!! --> No more wasting of gigs of memory to preview large pdf in a 100x100px square; was the only option to get it working on 32bit JVMs).

If there's interest, let me know and I'll try to pull relevant changes out.

@rausm
Copy link
Author

rausm commented Nov 19, 2018

Looking at it one last time: will require checking/updating either the
LOGGER.info(RES.get("console.updateVersion", new String[] { pdfVer, hashVer }));
or the "console.updateVersion" resource..

@rausm
Copy link
Author

rausm commented Nov 21, 2018

I improved upon the original PR a bit. At the time of posting, I just hand-transplanted the code in plain text editor (I wasn't sure when I'll have free time, and was putting off sending my changes upstream few years already ...).

Now I imported the official/your version into InteliJ, fixed a few mishaps (in mine fixes, of course ;-) and verified that it builds.
Let me know if anything else need improving, or if I should squash the changes into one commit (ditto for the drag&drop PR).

@kwart
Copy link
Member

kwart commented Nov 10, 2021

@rausm Sorry for such a late reply. Could you rebase this for the latest master?

@kwart kwart force-pushed the master branch 6 times, most recently from f7efd80 to 9312988 Compare August 13, 2023 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants