Open Intelligent2013 opened 2 weeks ago
The FileAttachment
annotation is working differently than text with hyperlink with Javascript function (current):
Example from ISO_32000-2_sponsored-ec2.pdf
with two 'paper clips' links:
Another very simple PDF with /Subtype /FileAttachment
:
structure-attached.pdf
(found on GH somewhere, opening in the Adobe Acrobat only, not well-formed PDF)
Additional tasks:
Current progress, proof-of-concept example: test_attachments.tc4.presentation.pdf
The double-click on the 'Paperclip' icon doesn't work until the user click on the button 'Enable editing'.
Note: We can't generate PDF/A-3 for BIPM brochure, because the link to the embedded .mml file realized in the Apache FOP via JavaScript function, that doesn't allow by PDF/A-3.
That last file is a special file from Ange (a file format expert who experiments with minimal files)...
Other PDF files with file attachments on the public web:
@Intelligent2013
The double-click on the 'Paperclip' icon doesn't work until the user click on the button 'Enable editing'.
Correct. That is a PDF/A formal requirement to ensure that any user interaction (such as extracting an embedded file) cannot / does not mess with page content. This is not a bug :-)
Source issue: https://github.com/metanorma/metanorma/issues/407#issuecomment-2321962832
This is how the Apache FOP is working (the source code https://github.com/apache/xmlgraphics-fop/blob/c11f43c9dbf529b87820d77ef501aa10699fc9d8/fop-core/src/main/java/org/apache/fop/pdf/PDFFactory.java#L699) Apache FOP add JavaScript action to open the embedded file:
PDFBox PDFDebugger:
Adobe Acrobat:
From PDF Reference 1.7:
To do:
/Subtype /Link
to the File Attachment annotation (/Subtype /FileAttachment
with/FS
entry to an embedded file object