Feat/implement cv pdf download#171
Closed
Azfe wants to merge 6 commits into
Closed
Conversation
Add GET /cv/download endpoint that generates and streams the CV as PDF. Includes IPDFService interface, WeasyPrintPDFService with Jinja2 template, asyncio.to_thread for non-blocking generation, and updated Dockerfile/ requirements with WeasyPrint system and Python dependencies.
WeasyPrint requires libgobject-2.0-0 (provided by libglib2.0-0) at import time. Added to both production Dockerfile and Dockerfile.dev.
Packages libglib2.0-0, libpango-1.0-0, libpangocairo-1.0-0 and libgdk-pixbuf2.0-0 were renamed with t64 suffix in Bookworm as part of the 64-bit time_t transition.
Two-column layout with sidebar (contact, networks, skills, tools, certifications) and main area (header, bio, experience, education, projects, training). Uses frontend color palette and xhtml2pdf-compatible CSS (tables instead of flexbox/grid, no CSS variables).
xhtml2pdf pulls in svglib → rlpycairo → pycairo, which requires the libcairo2-dev system library to compile at pip install time. CI runners lacked that dependency, breaking every pipeline run. WeasyPrint ≥ v53 ships a pure-Python wheel (pydyf renderer), so pip install succeeds without any C compilation. Its runtime system deps (Pango, HarfBuzz, GDK-Pixbuf) are added to both Dockerfiles and to all three CI jobs. The service implementation is simplified to a single HTML(string=...).write_pdf() call, matching the file and class name that was already declared as the intended library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.