Repository navigation
Labels
pdfRelated to PDF export or PDF embedding.tracking-issueAn issue that tracks a larger piece of work.
Description
Here is what's missing in Typst for each of the PDF/A-2 compliance levels.
PDF/A-2b (done in #5075)
- 6.1.13 Implementation limits: Fail export for ... (PDF/A: 6.1.13 Implementation limits #2995)
- Strings longer than 32767 bytes
- Names longer than 127 bytes (e.g. when containing font name)
- More than 8388607 indirect objects
- More than 28 q/Q nesting level
- 6.2.3 Output Intent: Write an appropriate output intent. Potentially user-configurable. (PDF/A: 6.2.3 Output Intent #3002)
- 6.2.4.1 Device color spaces: Do not write DeviceCMYK without defining the DefaultCMYK color space or a CMYK rendering intent. Possibilities include failing export, a default ICC profile, and user-supplied ICC profiles. (PDF/A: 6.2.3 Output Intent #3002)
- 6.2.4.4 Separations and DeviceN color spaces: Oklab, HSL, and HSV colors produce a DeviceN color space without constituent separations in a Colorant dict entry. They are not expressible as such and shall hence either fail export, be implemented as ICC profiles, or rendered to another space. (PDF/A: 6.2.4.4 Separations and DeviceN color spaces #3003)
- 6.2.4.5 Indexed and Pattern color spaces: Due to violation of the color subclauses above (PDF/A: 6.2.3 Output Intent #3002, PDF/A: 6.2.4.4 Separations and DeviceN color spaces #3003)
- 6.2.11.8
.notdefglyph: Fail export to PDF/A if the document contains a.notdefglyph. Typst will output these if the font does not contain the glyph and if either font fallback is disabled or no other fallback font has the glyph either. (PDF/A: 6.2.11.8.notdefglyph #3004) - 6.3.2 Annotation dictionaries: Add annotation flags to the link annotations
- 6.6.2.3.2 Metadata extension schemas: Describe the
xmpMM,,xmpTPgpdf, andpdfaidschemas using thepdfaSchemaextension schema description schema - 6.6.2.3.3 Extension Schema Container: See above
- 6.6.4 Version and conformance levels: Write an PDF/A ID entry in the XMP metadata for conforming files
- 6.6.6 File provenance information: Write an
xmpMM:Historybag in the metadata
Feature Requests in violation of PDF/A-2a: #1400, #955 (may be supported in some PDF/A-4 sub-standards)
The PDF/A spec imposes additional requirements touching the following issues: #895, #2499 (only other compliant PDFs may be embedded, also concerns #1465), #2421 / #1765,
PDF/A-2u
- All of the above tasks
- 6.2.11.7.2 Level U Conformance: Ensure that every glyph in the
ToUnicodemapping maps to a codepoint that is neither0,U+FEFF, orU+FFFE. All characters used in the document must appear in the mapping. This may currently not be the case in complex shaping scenarios.
PDF/A-2a
- All of the above tasks
- 6.2.11.7.3 Level A Conformance: Write a structure element with
ActualTextfor any character sequence that maps to the Unicode private use area. Fail export if this information is not available. - 6.7 Logical Structure: Write a Tagged PDF file. This includes enforcing human-readable replacement text for images and equations and tagging the content stream with the appropriate roles and attributes. (PDF Accessibility (tags, alt text, ...) #133)
Reacted by Myriad-Dreamin, Hans Christian Schmitz, Joshua, Akshay Raj Gollahalli, Joel L., Mark Janssen, Rowan Cockett, Alexo, ⑆ Neved4 ⑈, Aljaž Srebrnič and 21 more
Sub-issues
Collapse Sub-issuesSub-issues
Loading 5 sub-issues
Metadata
Metadata
Assignees
Labels
pdfRelated to PDF export or PDF embedding.tracking-issueAn issue that tracks a larger piece of work.
Activity
reknih commentedon Dec 13, 2023
Fixing the following would be easy:
Following issues would be easy to fix if the export could fail and emit diagnostics, which it cannot at the moment (#2943):
Heinenen commentedon Dec 17, 2023
@reknih Would you think a separate issue for each of the points above is beneficial (for more focussed discussion)?
If you think so, I can create them so you can edit your message to link to them.
An issue would then look like this (I'm open to change, just an example):
Title: PDF/A: 6.x.x.x name_of_feature
Content: Feature issue to #2942 + the rest of the bullet point in your list above
As for implementing 6.3.2 (spec, annotation flags):
It seems that all flags should be unset except for maybe the "print" flag. For the print flag I don't know if it should be set or not. Do you have any input on this?
Other than deciding which flag to use, it should probably be a one-liner here:
typst/crates/typst-pdf/src/page.rs
Lines 168 to 172 in 41c0dae
reknih commentedon Dec 18, 2023
I can create sub-issues for the clauses.
On 6.3.2, the PDF/A-2 spec says the following:
LaurenzV commentedon Dec 18, 2023
Just a short note that when implementing PDF/A compliance, not only do we need to make sure that it's implemented on the Typst side, but also on the svg2pdf side.
Heinenen commentedon Dec 18, 2023
That makes it clear, thank you.
Sadly, I didn't find a free version of the PDF/A spec myself.
NiklasEi commentedon Aug 17, 2024
Is there already a plan for the API on Typst side? Can users somehow decide if they want PDF/A or the "normal" PDF 1.7?
LaurenzV commentedon Aug 17, 2024
Don't think there are conrete plans yet, but I'm pretty sure it will be configurable.
.notdefglyph #3004