I need to create Open and easily-readable "PDF with source-content" (also named PDF Hybrid) by software tool like Prince or PDFreactor... This DocumentFoundation's FAQ explain what it is a PDF Hybrid, but not say what standard is using:
PDF/A-3
of ISO 19005-3?Detecting the standard of a known hybrid PDF file would be a good alternative approach... But some people say that it is impossible to detect the standard used in the PDF Hybrid file.
First of all, this Hybrid PDF appears not to be specified in an independent standard, i.e. there is no corresponding ISO/ETSI/ANSI/... standard for it.
That being said, it apparently is in particular a prominent feature of LibreOffice PDF exports:
(from the LibreOffice Writer FAQ on hybrid PDFs)
Inspecting such a file (e.g. this one) one sees that there are additional entries in the PDF trailer:
...
trailer
<</Size 128/Root 126 0 R
/Info 127 0 R
/ID [ <518EBB4C2FE2F6B638478335A7ED9CA4>
<518EBB4C2FE2F6B638478335A7ED9CA4> ]
/DocChecksum /7B00A6EE0349EB2EA1DFB5ECC5899A7C
/AdditionalStreams [/application#2Fvnd#2Eoasis#2Eopendocument#2Etext 66 0 R
]
>>
startxref
291605
%%EOF
and that referenced additional stream in object 66 indeed contains the source OpenOffice document.
Apparently applications supporting these hybrid PDF files inspect the value of that AdditionalStreams trailer entry, and if they know to handle the given document type (/application#2Fvnd#2Eoasis#2Eopendocument#2Etext
here corresponds to application/vnd.oasis.opendocument.text), they provide a way to extract that embedded document and open it for editing.
Beware: Unless I overlooked some ISO norm, those extra entries strictly speaking are forbidden by the PDF specification ISO 32000: In the trailer there may only be entries with keys that are either defined for the trailer in ISO specifications or any second-class names. Neither AdditionalStreams nor DocChecksum are ISO specified or second class. Thus, strictly speaking those hybrid PDFs are invalid PDFs.