Dear list, my sample to add attachments to a PDF/A-3 valid document is the following: \setuptagging[state=start] \setupbodyfont[30pt] \setupbackend [format=PDF/A-3a, intent=sRGB IEC61966-2.1, profile={sRGB.icc,default_gray.icc}, level=0] \setupcolors[pagecolormodel=auto] \setupinteraction[state=start] \starttext \startTEXpage[offset=1em] an attachment\attachment[file=xml-mkiv.pdf] \stopTEXpage \stoptext There are five reported errors when tested with the latest development version of veraPDF (http://downloads.verapdf.org/dev/verapdf-installer.zip): - Annotation should have /F value (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...); unless their Rect key value 1 equal to value 3 and value 2 equal to value 4, or the annotation subtype is /Popup or /Link. - Although not reported, the /F value should conform these considerations: If present, the F key's Print flag bit shall be set to 1 and its Hidden, Invisible, ToggleNoView, and NoView flag bits shall be set to 0. https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and... - Annotations need an appearance dictionary (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...); unless the same exception for the /F value apply. - The /EmbeddedFile dictionary should specify the MIME type in its /Subtype entry (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...). - The /AFRelationship key is missing from the /Filespec dictionary (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...). Possible values are: Source, Data, Alternative, Supplement, EncryptedPayload, FormData, Schema or Unspecified (from https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf). - The /Filespec lacks association with the PDF document or any of its parts, such as pages (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...). From https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf, it seems that either the /Catalog or a /Page dictionary (there are other ones, but I would limit attachments in ConTeXt to those two [if not to the /Catalog itself only]) should contain an /AF entry with the reference to the /Filespec object(s). I assume that the value type for the /AF entry is an array of one or multiple object references. These are all the issues veraPDF finds when validating the PDF document generated from the source above. I hope it helps. Many thanks for your help, Pablo -- http://www.ousia.tk
Il Dom 17 Mar 2019, 16:42 Pablo Rodriguez
Dear list,
my sample to add attachments to a PDF/A-3 valid document is the following:
\setuptagging[state=start]
\setupbodyfont[30pt]
\setupbackend [format=PDF/A-3a, intent=sRGB IEC61966-2.1, profile={sRGB.icc,default_gray.icc}, level=0]
\setupcolors[pagecolormodel=auto]
\setupinteraction[state=start] \starttext \startTEXpage[offset=1em] an attachment\attachment[file=xml-mkiv.pdf] \stopTEXpage \stoptext
There are five reported errors when tested with the latest development version of veraPDF (http://downloads.verapdf.org/dev/verapdf-installer.zip ):
- Annotation should have /F value ( https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and... ); unless their Rect key value 1 equal to value 3 and value 2 equal to value 4, or the annotation subtype is /Popup or /Link.
- Although not reported, the /F value should conform these considerations:
If present, the F key's Print flag bit shall be set to 1 and its Hidden, Invisible, ToggleNoView, and NoView flag bits shall be set to 0.
https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...
- Annotations need an appearance dictionary ( https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and... ); unless the same exception for the /F value apply.
- The /EmbeddedFile dictionary should specify the MIME type in its /Subtype entry ( https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and... ).
- The /AFRelationship key is missing from the /Filespec dictionary ( https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and... ). Possible values are: Source, Data, Alternative, Supplement, EncryptedPayload, FormData, Schema or Unspecified (from https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf).
- The /Filespec lacks association with the PDF document or any of its parts, such as pages ( https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and... ).
From https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf, it seems that either the /Catalog or a /Page dictionary (there are other ones, but I would limit attachments in ConTeXt to those two [if not to the /Catalog itself only]) should contain an /AF entry with the reference to the /Filespec object(s). I assume that the value type for the /AF entry is an array of one or multiple object references.
These are all the issues veraPDF finds when validating the PDF document generated from the source above.
I hope it helps. Many thanks for your help,
Pablo -- http://www.ousia.tk _______________________________________________ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
Ok, thank you very much. -- luigi
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote:
Dear list,
my sample to add attachments to a PDF/A-3 valid document is the following:
\setuptagging[state=start]
\setupbodyfont[30pt]
\setupbackend [format=PDF/A-3a, intent=sRGB IEC61966-2.1, profile={sRGB.icc,default_gray.icc}, level=0]
\setupcolors[pagecolormodel=auto]
\setupinteraction[state=start] \starttext \startTEXpage[offset=1em] an attachment\attachment[file=xml-mkiv.pdf] \stopTEXpage \stoptext
There are five reported errors when tested with the latest development version of veraPDF (http://downloads.verapdf.org/dev/verapdf-installer.zip):
These are all the issues veraPDF finds when validating the PDF document generated from the source above. Can you find the place in the official (online) pdf reference (specification) where this is explained? I like to work from that spec.
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 3/17/19 10:24 PM, Hans Hagen wrote:
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote:
[...] These are all the issues veraPDF finds when validating the PDF document generated from the source above. Can you find the place in the official (online) pdf reference (specification) where this is explained? I like to work from that spec.
These are the PDF/A version 2 and version 3 specs. They are ISO documents. It is the same thing as with the PDF-2.0 spec. I could relate some of the issues to the PDF-1.7 spec (but /AF and /AFRelationship aren’t part of it), if this made it easier for you. But I’m afraid that the explanations will be part of the PDF/A specifications. Pablo -- http://www.ousia.tk
On 3/17/19 10:24 PM, Hans Hagen wrote:
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote:
[...] These are all the issues veraPDF finds when validating the PDF document generated from the source above. Can you find the place in the official (online) pdf reference (specification) where this is explained? I like to work from that spec.
These are the PDF/A version 2 and version 3 specs. They are ISO documents. It is the same thing as with the PDF-2.0 spec.
I could relate some of the issues to the PDF-1.7 spec (but /AF and /AFRelationship aren’t part of it), if this made it easier for you.
But I’m afraid that the explanations will be part of the PDF/A specifications. so in the end this kind of standardization (whatever purpose it serves) forces dev of free software dev to buy all kind of standards ... i don't
On 3/17/2019 10:51 PM, Pablo Rodriguez wrote: like those commercial mix-ups in standards (pdf validation has always been a profitable business so i guess it will stay that way) (the problem with these things is that it doesn't pay of in terms of fun development) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 3/17/19 11:12 PM, Hans Hagen wrote:
On 3/17/2019 10:51 PM, Pablo Rodriguez wrote:
On 3/17/19 10:24 PM, Hans Hagen wrote:
[...] Can you find the place in the official (online) pdf reference (specification) where this is explained? I like to work from that spec. [...] But I’m afraid that the explanations will be part of the PDF/A specifications.
so in the end this kind of standardization (whatever purpose it serves) forces dev of free software dev to buy all kind of standards ...
I totally agree with you that this is no solution at all.
i don't like those commercial mix-ups in standards (pdf validation has always been a profitable business so i guess it will stay that way)
Adobe had a great policy allowing anyone to access the specifications for free. But once the PDF Reference became an ISO standard, they lost control over it. The problem here is the standards organization (ISO). [A similar case is the German DIN with their specs.] Those organizations assert copyrights to profit with the publishing of the standards. But that way, they don’t realize (or simply, they don’t care about the fact) that that precise policy hinders a wider adoption of the standards.
(the problem with these things is that it doesn't pay of in terms of fun development)
I wish I could provide a patch with the report, but I’m afraid this is beyond my knowledge 😔. Pablo -- http://www.ousia.tk
- The /AFRelationship key is missing from the /Filespec dictionary (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...). Possible values are: Source, Data, Alternative, Supplement, EncryptedPayload, FormData, Schema or Unspecified (from https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf). I assume that "Unspecified" is good enough as (1) it's pdf 2.0 and (2)
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote: there are probably no viewers out that that use it. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 4/4/19 1:11 PM, Hans Hagen wrote:
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote:
- The /AFRelationship key is missing from the /Filespec dictionary (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...). Possible values are: Source, Data, Alternative, Supplement, EncryptedPayload, FormData, Schema or Unspecified (from https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf). I assume that "Unspecified" is good enough as (1) it's pdf 2.0 and (2) there are probably no viewers out that that use it. Sorry, Hans, but what should be PDF-2.0 the main document or the embedded one?
As far as I know, Acrobat DC uses this information. Many thanks for your help, Pablo -- http://www.ousia.tk
On 4/22/2019 10:32 AM, Pablo Rodriguez wrote:
On 4/4/19 1:11 PM, Hans Hagen wrote:
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote:
- The /AFRelationship key is missing from the /Filespec dictionary (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...). Possible values are: Source, Data, Alternative, Supplement, EncryptedPayload, FormData, Schema or Unspecified (from https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf). I assume that "Unspecified" is good enough as (1) it's pdf 2.0 and (2) there are probably no viewers out that that use it. Sorry, Hans, but what should be PDF-2.0 the main document or the embedded one?
I have no clue. I think PDF 2.0 is basically PDF 1.7 but I wonder if viewers really look at these numbers. Anyway, Unspecified sounds ok to me because otherwise we'd expect users to come up with some dtail that then can conflict with what a viewer at some point in time triggers on. Concerning embedding ... the final document has the version. I suppose an embedded something has it's own namespace and can have any version. I see no reason why a pdf 1.7 document cannot have an embedded 2.0 document, as after all it's just a blob of data. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
- Although not reported, the /F value should conform these considerations:
If present, the F key's Print flag bit shall be set to 1 and its Hidden, Invisible, ToggleNoView, and NoView flag bits shall be set to 0. https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...
- Annotations need an appearance dictionary (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...); unless the same exception for the /F value apply.
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote: puzzling ... i wonder what the rationale is behind first introducing optional flags and then mandating them with bit disabling things ... if this is really as mentikoned that we might need to default to some safe values without bothering about user settings (which is now the case) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 4/4/19 1:20 PM, Hans Hagen wrote:
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote:
- Although not reported, the /F value should conform these considerations:
If present, the F key's Print flag bit shall be set to 1 and its Hidden, Invisible, ToggleNoView, and NoView flag bits shall be set to 0. https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...
- Annotations need an appearance dictionary (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...); unless the same exception for the /F value apply.
puzzling ... i wonder what the rationale is behind first introducing optional flags and then mandating them with bit disabling things ...
I guess that annotations in PDF/A are intended to be always printed and visible (at least, for versions 2 and 3).
if this is really as mentioned that we might need to default to some safe values without bothering about user settings (which is now the case)
I think that default may contain the safe and sane values for all annotations. Just in case it helps, Pablo -- http://www.ousia.tk
- The /Filespec lacks association with the PDF document or any of its parts, such as pages (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...).
From https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf, it seems that either the /Catalog or a /Page dictionary (there are other ones, but I would limit attachments in ConTeXt to those two [if not to the /Catalog itself only]) should contain an /AF entry with the reference to the /Filespec object(s). I assume that the value type for the /AF entry is an array of one or multiple object references.
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote: this is stricky one as some viewers then can end up with duplicate entries in side bars and/or funny scaling of the attachment symbol (at least that is what i remember when looking into it) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 4/4/19 1:23 PM, Hans Hagen wrote:
On 3/17/2019 4:41 PM, Pablo Rodriguez wrote:
- The /Filespec lacks association with the PDF document or any of its parts, such as pages (https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and...).
From https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf, it seems that either the /Catalog or a /Page dictionary (there are other ones, but I would limit attachments in ConTeXt to those two [if not to the /Catalog itself only]) should contain an /AF entry with the reference to the /Filespec object(s). I assume that the value type for the /AF entry is an array of one or multiple object references.
this is tricky one as some viewers then can end up with duplicate entries in side bars and/or funny scaling of the attachment symbol (at least that is what i remember when looking into it).
If I’m getting it right, only when at least one /Filespec object is used, either the /Catalog or the /Page dictionaries should have the /AF entry. When not used (when only the /EmbeddedFile is deployed), there should be no /AF in any dictionary. Just in case my explanation is clearer, Pablo -- http://www.ousia.tk
participants (3)
-
Hans Hagen
-
luigi scarso
-
Pablo Rodriguez