Linearize PDFs in processing
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
The processing steps live under documentcloud/documents/processing/info_and_image, which the issue links as the place where PDFs are handled. Read that code to find where the PDF is written after processing, then check how pikepdf's Pdf.save is called there. Done means processed PDFs are saved in linearized form, with a test or manual check that the output is linearized. Whether the S3 bucket needs configuration for range requests is still open and should be settled first.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
This would help loading large PDFs, building on this work in the viewer:
The one performance benefit of rendering PDF pages as images—instead of downloading the PDF and rendering it with PDF.js—is that very large files can be incrementally downloaded and rendered. In the majority of cases, downloading and rendering the PDF is faster and more performant than rendering an image for each page.
It appears to me that PDF.js supports partial rendering of linearized PDFs by default. In this demo, we can see in the network tab how each page is being independently fetched and rendered with 206 Partial Content responses. Linearizing a PDF requires additional steps during PDF creation (in Acrobat, there's a separate checkbox for "Fast Web View," which is a user-friendly name for linearization).
In a quick examination of DocumentCloud's processing pipeline, it doesn't appear to me that we perform linearization as a step in the process. While QPDF and pikepdf both support linearization, it's an opt-in feature that's disabled by default. It's unclear whether we need any special configuration to the S3 bucket to support partial requests, or if HTTP Range Requests are supported by default.
- Vorherrschende Sprache
- Python
- Sterne
- 55
- Forks
- 10
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 22
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus MuckRock/documentcloud
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 62/100
MuckRock/documentcloud#537 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 50/100
MuckRock/documentcloud#539 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 67/100
MuckRock/documentcloud#534 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
MuckRock/documentcloud#531 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
MuckRock/documentcloud#521 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in MuckRock/documentcloud
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
comp/desktop P3 type/feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NousResearch/hermes-agent#154285 ·
Maintainer antworten meist innerhalb von 1 Tag
-
docs: qualify copied and custom kubectl debug policy notesEvtl. vergeben @nym01 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
kubescape/cel-admission-library#166 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
SACGF/variantgrid#2804 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionEvtl. vergeben @bodapatisaikrishna hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag