Module: Pdfrb::Document::PdfA
- Included in:
- Pdfrb::Document
- Defined in:
- lib/pdfrb/document/pdf_a.rb
Overview
PDF/A production helper (ISO 19005-2). Installs the three things a conforming file must carry that a generic document does not:
* a GTS_PDFA1 OutputIntent with an embedded sRGB ICC
profile (DeviceGray/RGB rendering legitimacy),
* an XMP metadata stream carrying the pdfaid identification
(part + conformance) on the Catalog,
* a document Title so the XMP synchronises on write.
Fonts must be EMBEDDED separately (fonts.add with a file path); the standard-14 names alone do not satisfy 6.2.11.4.1.
Constant Summary collapse
- SRGB_IDENTIFIER =
"sRGB IEC61966-2.1"- SRGB_REGISTRY =
"http://www.color.org"
Instance Method Summary collapse
Instance Method Details
#enable_pdf_a!(part: 2, conformance: "B") ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/pdfrb/document/pdf_a.rb', line 23 def enable_pdf_a!(part: 2, conformance: "B") self.version = part == 4 ? "2.0" : "1.7" srgb_output_intent [:Title] ||= "Untitled" packet = xmp || Pdfrb::XMP::Packet.new packet.pdfa_id = { part: part, conformance: conformance } @xmp = packet @pdfa_part = part @pdfa_conformance = conformance self end |
#pdfa_conformance ⇒ Object
37 |
# File 'lib/pdfrb/document/pdf_a.rb', line 37 def pdfa_conformance; @pdfa_conformance; end |
#pdfa_part ⇒ Object
36 |
# File 'lib/pdfrb/document/pdf_a.rb', line 36 def pdfa_part; @pdfa_part; end |