Skip to main content

pdf-contents-extractor

Extract Table of Contents (TOC) as text from a pdf- or djvu-document (for use in e.g. handyoutliner)

requires:

  • for PDF, pytesseract and PyMuPDF (both can be easily installed with pip)
  • for DJVU, the ddjvu command available in the path

After installation type in a terminal: extract_contents /path/filename startpage lastpage (e.g.: extract_contents example.djvu 3 6) where startpage and lastpage are pagenumbers of the content pages. The script automatically recognizes the format (pdf or djvu)

The default tesseract language is english. Another language(s) can be set with -l flag (e.g.: -l eng+nld for english and dutch) but it requires the correct tesseract langpack to be installed.

for extra options and help type: extract_contents -h

The contents can be further edited in a text-editor and added to the pdf-file with handyoutliner (http://handyoutlinerfo.sourceforge.net/)

Release files for document-contents-extractor 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for document-contents-extractor 1.1
File Interpreter ABI Platform
document_contents_extractor-1.1-py3-none-any.whl Python 3 none any Details

Release files / document_contents_extractor-1.1-py3-none-any.whl

Download URL document_contents_extractor-1.1-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa469d47bcb27eef06ed78a588533cbf00b468717aae12e0d65301ab47603144
BLAKE2b-256 checksum
How to use checksums
236ed1c28493b76ef640d0d70f7fceae6b7a731883dcecb0a5310e5eafeadedb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

1.1 This release

1 release file

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page