mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
[V2] feat(convert): add PDF/X export option (#5285)
# Description of Changes This pull request adds support for converting PDF files to PDF/X format in the frontend, alongside the existing PDF/A conversion. The changes include UI updates, translation strings, configuration, and processing logic to enable PDF to PDF/X conversion using the same backend endpoint as PDF/A, with appropriate user options and warnings. **PDF/X Conversion Support:** - Added a new `ConvertToPdfxSettings` component for configuring PDF/X conversion options, including output format selection and digital signature warnings. (`frontend/src/core/components/tools/convert/ConvertToPdfxSettings.tsx`) - Updated the conversion settings UI to display PDF/X options when converting from PDF to PDF/X. (`frontend/src/core/components/tools/convert/ConvertSettings.tsx`) **Configuration and Processing Logic:** - Extended conversion constants and parameters to recognize PDF/X as a target format, map it to the PDF/A backend endpoint, and ensure correct file naming and processing behavior. (`frontend/src/core/constants/convertConstants.ts`, `frontend/src/core/hooks/tools/convert/useConvertOperation.ts`, `frontend/src/core/hooks/tools/convert/useConvertParameters.ts`) - Ensured that PDF/X conversions are processed separately per file, similar to PDF/A. (`frontend/src/core/hooks/tools/convert/useConvertOperation.ts`) **UI and Translation Updates:** - Updated translation strings to include PDF/X options, descriptions, and warnings. (`frontend/public/locales/en-GB/translation.toml`) <img width="366" height="998" alt="image" src="https://github.com/user-attachments/assets/b28fa095-9350-4db2-a0b5-bddcf003fa46" /> <!-- Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --> --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details. --------- Signed-off-by: Balázs Szücs <[email protected]> Co-authored-by: Anthony Stirling <[email protected]>
This commit is contained in:
co-authored by
Anthony Stirling
parent
039e3b5fa8
commit
4d84dcdd42
@@ -1264,7 +1264,10 @@ downloadHtml = "Download HTML intermediate file instead of PDF"
|
||||
pdfaOptions = "PDF/A Options"
|
||||
outputFormat = "Output Format"
|
||||
pdfaNote = "PDF/A-1b is more compatible, PDF/A-2b supports more features, PDF/A-3b supports embedded files."
|
||||
pdfaFormat = "PDF/A Format"
|
||||
pdfaDigitalSignatureWarning = "The PDF contains a digital signature. This will be removed in the next step."
|
||||
pdfxDigitalSignatureWarning = "The PDF contains a digital signature. This will be removed in the next step."
|
||||
pdfxDescription = "PDF/X is an ISO standard PDF subset for reliable printing and graphics exchange."
|
||||
fileFormat = "File Format"
|
||||
wordDoc = "Word Document"
|
||||
wordDocExt = "Word Document (.docx)"
|
||||
@@ -2197,6 +2200,16 @@ tip = "Currently does not work for multiple inputs at once"
|
||||
outputFormat = "Output format"
|
||||
pdfWithDigitalSignature = "The PDF contains a digital signature. This will be removed in the next step."
|
||||
|
||||
[pdfToPDFX]
|
||||
tags = "print,standard,conversion,production,prepress,archive"
|
||||
title = "PDF To PDF/X"
|
||||
header = "PDF To PDF/X"
|
||||
credit = "This service uses Ghostscript for PDF/X conversion"
|
||||
submit = "Convert"
|
||||
tip = "Currently does not work for multiple inputs at once"
|
||||
outputFormat = "Output format"
|
||||
pdfWithDigitalSignature = "The PDF contains a digital signature. This will be removed in the next step."
|
||||
|
||||
[PDFToWord]
|
||||
tags = "doc,docx,odt,word,transformation,format,conversion,office,microsoft,docfile"
|
||||
title = "PDF to Word"
|
||||
|
||||
Reference in New Issue
Block a user