annotated-pdf-spec VS polyfile

Compare annotated-pdf-spec vs polyfile and see what are their differences.

annotated-pdf-spec

Collection of useful hints for implementing a PDF library (by gettalong)

polyfile

A pure Python cleanroom implementation of libmagic, with instrumented parsing from Kaitai struct and an interactive hex viewer (by trailofbits)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
annotated-pdf-spec polyfile
1 2
5 323
- 0.6%
10.0 7.6
about 2 years ago 2 months ago
Python
- 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.

annotated-pdf-spec

Posts with mentions or reviews of annotated-pdf-spec. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-17.
  • Show HN: I am building a new Python library to read/write PDF files
    17 projects | news.ycombinator.com | 17 Nov 2022
    As others have already written, there are many slightly invalid PDF files out there in the wild that many readers can display mostly fine and which your library should also be able to handle.

    If you can, grab yourself a copy of the most recent PDF 2.0 specification since it contains much more information and is much more correct in terms of how to implement things. Also have a look at the errata at https://pdf-issues.pdfa.org/32000-2-2020/index.html.

    As I'm implementing a PDF library (in Ruby), I have started to collect some situations that arise in the wild but are not spec-compliant, see https://github.com/gettalong/annotated-pdf-spec. That might help you in parsing some invalid PDFs

polyfile

Posts with mentions or reviews of polyfile. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-23.
  • Blind Spots: Automatically detecting ignored program inputs
    2 projects | news.ycombinator.com | 23 Jan 2023
  • Show HN: I am building a new Python library to read/write PDF files
    17 projects | news.ycombinator.com | 17 Nov 2022
    Be careful with PDF! There are many ambiguities in the specification that are implemented differently between parsers, as well as implicitly accepted malformations that almost all parsers will silently accept without warning. It is very easy to accidentally produce so-called file format schizophrenia: When the same file is rendered differently between two parsers. For example, with PDF, what if you have a PDF object stream that has a length that doesn't agree with the position of its `endstream` token? What if you have a PDF dictionary with duplicate keys? Do you use the value of the first key or the second? What if you have two, valid PDFs concatenated one after the other? Do you render the first or the second? What if an object in the XREF table has an incorrect offset?

    Shameless plug: I am one of the maintainers of PolyFile, which, among other things, can produce an interactive HTML hex editor with an annotated syntax tree for dozens of filetypes, including PDF. For PDF, it uses a dynamically instrumented version of the PDFminer parser. It sounds like it might satisfy your use case.

    https://github.com/trailofbits/polyfile

What are some alternatives?

When comparing annotated-pdf-spec and polyfile you can also consider the following projects:

pdfquery - A fast and friendly PDF scraping library.

PyMuPDF - PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.

pdfsyntax - A Python library to inspect and modify the internal structure of a PDF file

polytracker - An LLVM-based instrumentation tool for universal taint tracking, dataflow analysis, and tracing.

i7j-rups - RUPS is an acronym for Reading and Updating PDF Syntax. RUPS is a tool built on top of iText® that allows you to look inside a PDF document and browse the different PDF objects and content streams.

pdfplumber - Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.

betterwrite - :bookmark_tabs: A Creative Word Processor.

pandoc - Universal markup converter

mupdf - mirrored from git://git.ghostscript.com/mupdf.git