Live data from Hacker News

Borb – A Python library to read, write, and edit PDF files

borbpdf.com

41–50 of 50 posts

Re: Borb – A Python library to read, write, and edit PDF files

#41

Earlier quoted context omitted.

PDF uses postscript, which is Turing equivalent. It's a document format with the halting problem.

That is not a realistic concern for GP. The scanned exams won't even involve any Postscript.

I do insert the score radio buttons using the "pdfmark" mechanism via Postscript.

Re: Borb – A Python library to read, write, and edit PDF files

#42
post #11

Earlier quoted context omitted.

> There are many evolutionary layers and no formal specification or verification; There is a specification, but it's very complicated.

PDF uses postscript, which is Turing equivalent. It's a document format with the halting problem.

HTML uses JavaScript which is also Turing complete. Lack of the halting problem is nice, but having it is not a show stopper.

Re: Borb – A Python library to read, write, and edit PDF files

#43

Earlier quoted context omitted.

PDF uses postscript, which is Turing equivalent. It's a document format with the halting problem.

Postscript files are often rendered into PDF, but PDF doesn't use postscript.

See dunham's answer. Anyone who has seen a PDF file in text form would swear they're looking at Postscript. There's a common intersection that's identical.

Very roughly speaking (this is a semantic debate where everyone is wrong from someone else's perspective), a PDF file is a restricted subset of Postscript, with added indexes so one can render pages in the middle without having to process the code from the beginning.

The hardship in generating PDFs from scratch is getting those indexes right. It's far easier to convert a Postscript file using standard tools.

Re: Borb – A Python library to read, write, and edit PDF files

#46

Earlier quoted context omitted.

Postscript files are often rendered into PDF, but PDF doesn't use postscript.

See dunham's answer. Anyone who has seen a PDF file in text form would swear they're looking at Postscript. There's a common intersection that's identical. Very roughly speaking (this is a semantic debate where everyone is wrong from someone else's perspective), a PDF file is a restricted subset of Postscript, with added indexes so one can render pages in the middle without having to process the code from the beginni…

The same way as JSON is a subset of JS, it has radically different properties that way, so comparisons to postscript is not really meaningful.

Re: Borb – A Python library to read, write, and edit PDF files

#47
post #6

I am a math professor with a scanned exam grading workflow that I hacked together as Bash scripts using various open source command line tools. I feed all the exams through a sheet-fed scanner, decode bar codes to identify problems and students, add radio buttons for entering and tracking scores (0-6 per problem), and create PDF "books" per problem for grading and annotating. Having grad students help grade paper is…

Would you be willing to list all of the command line tools you're using?

Re: Borb – A Python library to read, write, and edit PDF files

#48

Earlier quoted context omitted.

Postscript files are often rendered into PDF, but PDF doesn't use postscript.

See dunham's answer. Anyone who has seen a PDF file in text form would swear they're looking at Postscript. There's a common intersection that's identical. Very roughly speaking (this is a semantic debate where everyone is wrong from someone else's perspective), a PDF file is a restricted subset of Postscript, with added indexes so one can render pages in the middle without having to process the code from the beginni…

That's fair. I was waffling about using stronger language, "pdf isn't postscript", but didn't get there. It would have been more correct.

Re: Borb – A Python library to read, write, and edit PDF files

#49
post #31

Earlier quoted context omitted.

Perhaps you might be interested in the Zesje project: https://gitlab.kwant-project.org/zesje/zesje

More information: https://sandbox.grading.quantumtinkerer.tudelft.nl/ , https://zesje.tudelft.nl/about/ It sounds like it's still mostly a prototype?

Sorry, I should have elaborated in my initial comment.

I was briefly involved as a developer several years ago (as part of my bachelor's thesis). At that time, it was mostly beta-quality, but it was already in use by multiple professors for grading. I haven't been involved with the project since, so I'm not sure about the current status.

I think the homepage [1], which you linked to and where it mentions that it's still a prototype, is at least somewhat outdated; it has a screenshot of a very old version of the software. At least the 'support' section still looks accurate, though.

If you're interested in using it, I would advise getting in touch via the Mattermost channel or mailing list (both linked to from the homepage [1]) and asking about the current state of the project. Tell them Jamy sent you :)

[1] https://sandbox.grading.quantumtinkerer.tudelft.nl/

Re: Borb – A Python library to read, write, and edit PDF files

#50
post #6

I am a math professor with a scanned exam grading workflow that I hacked together as Bash scripts using various open source command line tools. I feed all the exams through a sheet-fed scanner, decode bar codes to identify problems and students, add radio buttons for entering and tracking scores (0-6 per problem), and create PDF "books" per problem for grading and annotating. Having grad students help grade paper is…

If you want to do something like this in Ruby, have a look at HexaPDF - https://hexapdf.gettalong.org/ - which provides a full-blown implementation for reading and writing PDFs and is quite mature already (n.b. I'm the author).

It is licensed AGPL+Commercial but if you just use it for yourself, this does not matter as you can use the AGPL.

Post reply on HN