lopdf VS PDF.js

Compare lopdf vs PDF.js and see what are their differences.

lopdf

A Rust library for PDF document manipulation. (by J-F-Liu)

PDF.js

PDF Reader in JavaScript (by mozilla)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
lopdf PDF.js
4 83
1,459 45,833
- 1.2%
6.6 9.9
1 day ago about 20 hours ago
Rust JavaScript
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

lopdf

Posts with mentions or reviews of lopdf. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-24.
  • How to convert SVGs containing text to a PDF?
    2 projects | /r/rust | 24 Jan 2023
    I then came up with the genius idea of exporting the PDF using Inkscape and then just edit the text of the PDF, but using lopdf the text is all stacked ontop of each other. How can I simply convert a SVG to PDF using Rust or change the text of a PDF using Rust?
  • Purdy: An experimental PDF renderer using WebGPU
    5 projects | /r/rust | 2 Feb 2022
    I copied a lot from lopdf which is a terrific library for PDF parsing. I don't rely on it explicitly as a dependency because there are some things I'm choosing to do differently, but I'd say at least 80% of the parsing logic is the same so it helped me to bootstrap quite a bit.

PDF.js

Posts with mentions or reviews of PDF.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-28.
  • Building W-9 Crafter
    4 projects | dev.to | 28 Mar 2024
    I first started building the app in the browser, using PDF.js and Download.js to take a PDF and edit it, and then download it to your computer.
  • Parsing PDFs in Node.js
    5 projects | dev.to | 12 Mar 2024
    pdf2json is a module that transforms PDF files from binary to JSON format, using pdf.js for its core functionality. It also incorporates support for interactive form elements, enhancing its utility in processing and interpreting PDF content.
  • PDF Chat with Node.js, OpenAI and ModelFusion
    2 projects | dev.to | 3 Sep 2023
    We use Mozilla's PDF.js via the pdfjs-dist NPM module to load pages from a PDF file. The loadPdfPages function reads the PDF file and extracts its content. It returns an array where each object contains the page number and the text of that page.
  • Microsoft faces antitrust scrutiny from the EU over Teams, Office 365
    5 projects | news.ycombinator.com | 19 Jul 2023
    The problem is that there simply wasn't a better option at the time.

    Ogg Vorbis was a novelty at best, and it was the only decently widely adopted open source competitor for any of the items listed that was available at the time.

    HTML5 was only just published when Chrome launched. So Flash was at that point the only option available to show a video in the browser (sure, downloading a RealPlayer file was always an option, but it was clunky, creators didn't like people being able to save stuff locally, and was also not open source). Chrome in fact arguably accelerated the process of getting web video open sourced: Google bought On2 in 2010 to get the rights to VP8 (the only decent H.264 competitor available at that point) so they could immediately open source it. The plan was in fact to remove H.264 from Chrome entirely once VP8/VP9 adoption ramped up[1], but that didn’t end up happening.

    Flash was integrated into Chrome because people were going to use it anyway, and having Google distribute it at least let them both sandbox it and roll out automatic updates (a massive vector for malware at the time was ads pretending to be Flash updates, which worked because people were just that used to constant Flash security patches, most of which required a full reboot to apply; Chrome fixed both of those issues). Apple are the ones who ultimately dealt the death blow to Flash, and it was really just because Adobe could not optimize it for phone CPUs no matter what they tried (even the few Android releases of Flash that we got were practically unusable). That also further accelerated the adoption of open source HTML5 technologies.

    PDF is an open source format, and has been since 2008. While I don't know if pressure from Google is what did it, that wouldn’t surprise me. Regardless, the Chrome PDF reader, PDFium, is open source[2] and Mozilla's equivalent project from 2011, PDF.js, is also open source.[3] Both of these projects replaced the distinctly closed source Adobe Reader plugin that was formerly mandatory for viewing PDFs in the browser.

    Chrome is directly responsible for eliminating a lot of proprietary software from mainstream use and replacing it with high-quality open source tools. While they've caused problems in other areas of browser development that are worthy of criticism, Chrome's track record when it comes to open sourcing their tech has been very good.

    [1]: https://blog.chromium.org/2011/01/html-video-codec-support-i...

    [2]: https://github.com/chromium/pdfium

    [3]: https://github.com/mozilla/pdf.js

  • Created a script that turns a Firefox profile into a standalone PDF reader app
    2 projects | /r/FirefoxCSS | 9 May 2023
    Why do this instead of just using something like tauri to wrap https://github.com/mozilla/pdf.js ?
  • How to save marked-up PDF in Firefox
    2 projects | /r/firefox | 15 Jan 2023
    If you want to report this to Mozilla, please open this page and click on New issue.
    2 projects | /r/firefox | 15 Jan 2023
    Update Firefox to the latest version (108) and then try editing this sample file. I suspect there's something preventing edits to your own PDF. If that's the case, you can report it to the developers of the PDF feature.
  • Firefox Android Added Save as PDF
    2 projects | news.ycombinator.com | 26 Dec 2022
    They already have a pdf reader they could add with ease https://github.com/mozilla/pdf.js
  • dynamically generating pdf file with node
    2 projects | /r/node | 29 Nov 2022
    PDF.js is similar
  • Show HN: I am building a new Python library to read/write PDF files
    17 projects | news.ycombinator.com | 17 Nov 2022
    The PDF format is diverse enough for such a new project to still have plenty of incompatibilities. If you wanted to find many of them quickly, you might want to have a look at the documents used as test cases in other projects, such as pdf.js:

    https://github.com/mozilla/pdf.js/tree/master/test/pdfs

What are some alternatives?

When comparing lopdf and PDF.js you can also consider the following projects:

jsPDF - Client-side JavaScript PDF generation for everyone.

pdfmake - Client/server side PDF printing in pure JavaScript

PDFKit - A JavaScript PDF generation library for Node and the browser

printpdf - An easy-to-use library for writing PDF in Rust

Papa Parse - Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input

diff2html - Pretty diff to html javascript library (diff2html)

MPMBs-Character-Record-Sheet - MorePurpleMoreBetter's D&D 5e Character Record Sheet

pdf-lib - Create and modify PDF documents in any JavaScript environment

jBinary - High-level API for working with binary data.

kiss3d - Keep it simple, stupid 3d graphics engine for Rust.

purdy - An experimental PDF renderer built on WebGPU

pdf.js-viewer - This package makes the PDF.js viewer available to third party applications.