Download PDFs from ePapyrus StreamDocs viewers
Project description
streamdoc-dl
Slop coded. PRs welcome.
Download PDFs from ePapyrus StreamDocs viewers.
StreamDocs is an HTML5 document viewer by ePapyrus used on Korean government sites (standard.go.kr, e-book.scourt.go.kr, etc.) that renders PDFs as page images in-browser with download disabled. This tool reconstructs the PDF by downloading page images and text data, producing a searchable PDF with selectable text.
Install
pip install streamdoc-dl
Usage
streamdoc-dl 'https://www.standard.go.kr/streamdocs/view/sd;streamdocsId=1234567890'
Output filename is auto-detected from the server metadata.
Options
streamdoc-dl URL [-o OUTPUT] [-z ZOOM] [-j JOBS] [--font FONT] [--compress [LEVEL]]
| Option | Default | Description |
|---|---|---|
-o |
auto | Output PDF path |
-z |
300 | Zoom level (100=native, 200=2x, 300=3x) |
-j |
4 | Concurrent download threads |
--font |
auto | Path to TTF font for text layer |
--compress |
off | Compress with Ghostscript (screen/ebook/printer/prepress) |
Compression
Use --compress to reduce output size via Ghostscript (gs must be installed):
streamdoc-dl URL --compress # default: ebook quality
streamdoc-dl URL --compress printer # higher quality
Font auto-detection
The invisible text layer needs a Korean-capable font for search/copy. The tool tries:
- NanumGothic from common system paths
fc-match :lang=ko(Linux with fontconfig)- Fallback to reportlab built-in CID font (HYSMyeongJo-Medium)
To use a specific font: --font /path/to/font.ttf
How it works
- Fetches document metadata from the StreamDocs v4 API
- If the server allows direct download, fetches the original PDF
- Otherwise, downloads page images and text data concurrently
- Fixes the corrupted first byte on each image (server-side anti-scrape)
- Builds a PDF with image backgrounds and invisible text overlay
License
GPL-3.0-or-later
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamdoc_dl-0.2.0.tar.gz.
File metadata
- Download URL: streamdoc_dl-0.2.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
692c4d8444b8f6085b3569637fa22f26f88bfb958fd556156bec69301ef1b89b
|
|
| MD5 |
71a90da5e6b813d05fc7c6679cb12250
|
|
| BLAKE2b-256 |
ffcd13cdf8aecbace7a66ecad0de2d7c480ca6226cfe5c6ef4d962723fe73764
|
File details
Details for the file streamdoc_dl-0.2.0-py3-none-any.whl.
File metadata
- Download URL: streamdoc_dl-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20a642ddc560e4e4d4bea907812a83bd34d5ad7a4860c75b331632f9919f7767
|
|
| MD5 |
30540b81af07bc0b5e729f21cdc885a8
|
|
| BLAKE2b-256 |
07af27792c5b05fde646d29f6f2faf5b6304508dd0cf2e2326ca622402369d67
|