Conversation
Converts all text in a PDF to vector outlines via Ghostscript -dNoOutputFonts — a standard prepress step that removes font dependency and licensing issues before print. Registered in the Other and Ghostscript endpoint groups so it is disabled automatically when Ghostscript is not installed, and the controller returns a ToolRequiredException when the group is off. Refs Stirling-Tools#471
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughAdds a multipart PDF endpoint that uses Ghostscript to convert text to outlines and returns the resulting PDF. Registers the endpoint in Java, Python, and frontend tool metadata. Adds controller tests and a Cucumber scenario. ChangesText-to-outlines conversion
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Client
participant TextToOutlinesController
participant Ghostscript
Client->>TextToOutlinesController: Submit multipart PDF
TextToOutlinesController->>Ghostscript: Run with -dNoOutputFonts
Ghostscript-->>TextToOutlinesController: Return conversion result
TextToOutlinesController-->>Client: Return outlined PDF
Suggested reviewers: Merge Risk: 🔵 Low · up to PDFs using bitmap fonts may retain bitmap text despite the vector-outlines promise, which could mislead prepress users expecting vector-only output. The risk is limited to those inputs but should be clarified. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to A new upload route invokes Ghostscript on submitted PDFs. Existing availability and execution controls reduce exposure, but the access rules and process isolation of deployed instances are not established. The endpoint can also report success without confirming that conversion produced a usable PDF. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Hi, We are generally trying to move away from GS, and also this isn't really hooked up to anything, so I fail to see how this is useful. In general:
Thanks. |
Keeps the committed generated models (frontend toolApiTypes/toolIO, engine tool_models/tool_io) in sync with the Java OpenAPI spec. Generated with: task tool-models
|
Thanks for the review — fair points. A Ghostscript-dependent standalone endpoint doesn't fit the project's direction. Closing this; I'll keep iterating on my fork and may come back with an integrated, non-GS approach. |
Description of Changes
Adds
POST /api/v1/misc/text-to-outlines, which converts all text in a PDF to vector outlines via Ghostscript-dNoOutputFonts.Converting text to outlines is a standard prepress step — it removes font dependencies and font-licensing concerns when sending files to print. This was requested in #471.
Details:
fileInput), consistent with the "PDF API" scope for prepress features discussed in Setting page info while resizing or cropping page #1194/[Feature Request]: Using Page boxes for scaling and potentially other tools such as bleed etc #2004.OtherandGhostscriptendpoint groups, so it is automatically disabled when Ghostscript is not installed; the controller additionally returnsToolRequiredException(createGhostscriptRequiredException) when the group is off.ProcessExecutor+TempFileManagerpattern (same as crop-with-Ghostscript); output analysed viadetectGhostscriptCriticalErrorbefore the return code is checked.GhostscriptException; interruption is wrapped viacreateProcessingInterruptedException.Refs #471
Checklist
General
Documentation
Translations (if applicable)
scripts/counter_translation.pyUI Changes (if applicable)
Testing (if applicable)
task checkto verify linters, typechecks, and tests passSummary by CodeRabbit