The code below (which puts a clickable link on a page) distills correctly on both Mac and PC distiller, if the settings are "Standard" or "Smallest File Size". With settings of any of the PDF/X or PDF/A variants, it errors "Annotations were found inside the BleedBox, TrimBox, or ArtBox". Please, how can I prevent this, or test for the likelihood of the non-distillation?
%!
/pdfmark where {pop} {/globaldict where {pop globaldict} {userdict} ifelse /pdfmark /cleartomark load put} ifelse
(Test page) mark exch /Label exch /PAGELABEL pdfmark
jdaw1 <jdawise...@gmail.com> wrote: >The code below (which puts a clickable link on a page) distills >correctly on both Mac and PC distiller, if the settings are "Standard" >or "Smallest File Size". With settings of any of the PDF/X or PDF/A >variants, it errors "Annotations were found inside the BleedBox, >TrimBox, or ArtBox". Please, how can I prevent this, or test for the >likelihood of the non-distillation?
If you want PDF/X compliance your annotations, if you have any, must be completely outside the BleedBox (or the TrimBox, if there is no BleedBox, or CropBox, finally MediaBox.
You cannot have clickable links in a PDF/X file; the standard forbids it. ---------------------------------------- Aandi Inston Please support usenet! Post replies and follow-ups, don't e-mail them.
Or, bonus question, is it possible to instruct the Distiller to ignore non-compliant features and produce output anyway? Or even just to produce output, whether or not compliant?
jdaw1 <jdawise...@gmail.com> wrote: >Or, bonus question, is it possible to instruct the Distiller to ignore >non-compliant features and produce output anyway? Or even just to >produce output, whether or not compliant?
What would be the purpose of that? If one doesn't care whether a file is compliant, just don't select any of the compliance options!
You can probably use currentdistillerparams to see if any of the compliance options have been set. You can't check the job options name, but you have access to all of the options. ---------------------------------------- Aandi Inston Please support usenet! Post replies and follow-ups, don't e-mail them.
Page 51 of partners.adobe.com/public/developer/en/acrobat/sdk/pdf/ pdf_creation_apis_and_specs/DistillerParameters.pdf leads to the following code. Suggestions and improvements welcomed.
%!
% Returns true if distiller settings require compliant files, otherwise false /currentdistillerparams where {pop currentdistillerparams /CheckCompliance 2 copy known {get dup length 0 eq {pop false} {0 get /None ne} ifelse} {pop pop false} ifelse} {false} ifelse
Oooh! But what if CheckCompliance conflicts with PDFX1aCheck or PDFX3Check? Hmmm:
% If distiller settings require compliant files, % RequireCompliantOutput true, otherwise returns false /RequireCompliantOutput /currentdistillerparams where { pop currentdistillerparams dup /CheckCompliance 2 copy known {get false exch {/None ne {pop true exit} if} forall} {pop pop false} ifelse exch dup /PDFX1aCheck 2 copy known {get} {pop pop false} ifelse exch /PDFX3Check 2 copy known {get} {pop pop false} ifelse or or
} {false} ifelse def % RequireCompliantOutput
RequireCompliantOutput {(ISO PDF output: no on-page clickable links)} {(No PDF standard required: will include on-page clickable links)} ifelse = % RequireCompliantOutput