how to read a pdf file using lisp
Asked Answered
L

2

6

how we can read a pdf using lisp and separate the table of content. This can be done by other languages but in lisp this is bit difficult any can help me with a sample code?

http://www.rajive-hsenid.appspot.com/

this is done by python now i am trying to do this with lisp

please help me..

Luane answered 18/11, 2010 at 11:48 Comment(0)
O
6

Try cl-pdf-parser--I found it on Google. This code is too big to post here. Look for the file pdf-parser.lisp(insider the archive).

cl-pdf-parser comes with examples: http://www.fractalconcept.com/download/cl-pdf-current.tgz

Odorous answered 18/11, 2010 at 13:13 Comment(0)
F
1

Followup to this since the original link listed by @frayser doesn't work (but is available in the Wayback Machine; for the curious: https://web.archive.org/web/20200618163802/http://www.fractalconcept.com/asp/w0Rj/sdataQ0v$QsmkCsLvDM==/asdataQuQhZ0XhCuWs).

The code is now on GitHub: https://github.com/archimag/cl-pdf which I have started off with the following that works for me (Debian 11.6, SBCL 2.1.1.debian):

# Using quicklisp; there are tutorials for quicklisp out there, and if
# you use another package manager then adapt the following to that.
cd ~/.quicklisp/local-projects/
git clone --recursive https://github.com/archimag/cl-pdf.git

Then fire up your Lisp REPL and:

(ql:quickload "cl-pdf-parser")
(in-package pdf)
(read-pdf-file "/path/to/my-file.pdf")

And so far it's parsed the PDF I'm interested in right now; might followup some more later, but hopefully that's enough to get people started, as the source is available.

Finbar answered 15/2, 2023 at 18:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.