Linearize PDFs in processing
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 55
- Forks
- 10
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 22
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MuckRock/documentcloud
-
Remove cpuprofile dependencyAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
MuckRock/documentcloud#537 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
MuckRock/documentcloud#539 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
MuckRock/documentcloud#534 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
MuckRock/documentcloud#531 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
MuckRock/documentcloud#521 ·
Los mantenedores suelen responder en 1 día
Todos los issues de MuckRock/documentcloud
Issues similares
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionPosiblemente ocupada @bodapatisaikrishna la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[integration]: NoMacSandboxAbiertoexternal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
langchain-ai/docs#7652 ·
Los mantenedores suelen responder en 1 día
-
[oblt-aw][autodoc] Document new e2e-secret-leak-artifacts workflow and update e2e-all leaf listAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
elastic/oblt-aw#2513 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
amd/gaia#7326 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
NCAR/CLM-Tutorial#113 · 1 comentario ·
Los mantenedores suelen responder en 1 día