Skip to content

Instantly share code, notes, and snippets.

@Cospel
Created September 22, 2015 14:17
Show Gist options
  • Save Cospel/80b0d936edaa8225a52f to your computer and use it in GitHub Desktop.
Save Cospel/80b0d936edaa8225a52f to your computer and use it in GitHub Desktop.
%!
% This is a sample prefix file for creating a PDF/A document.
% Feel free to modify entries marked with "Customize".
% This assumes an ICC profile to reside in the file (ISO Coated sb.icc),
% unless the user modifies the corresponding line below.
% Define entries in the document Info dictionary :
/ICCProfile (/usr/share/ghostscript/9.07/iccprofiles/ISOcoated_v2_300_eci.icc) % Customize.
def
[ /Title (Title) % Customize.
/DOCINFO pdfmark
% Define an ICC profile :
[/_objdef {icc_PDFA} /type /stream /OBJ pdfmark
[{icc_PDFA} <</N systemdict /ProcessColorModel get /DeviceGray eq {1} {4} ifelse >> /PUT pdfmark
[{icc_PDFA} ICCProfile (r) file /PUT pdfmark
% Define the output intent dictionary :
[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark
[{OutputIntent_PDFA} <<
/Type /OutputIntent % Must be so (the standard requires).
/S /GTS_PDFA1 % Must be so (the standard requires).
/DestOutputProfile {icc_PDFA} % Must be so (see above).
/OutputConditionIdentifier (ISO Coated v2 300% (ECI)) % Customize
/PUT pdfmark
[{Catalog} <</OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment