Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pdfmark, annotations, and PDF/X

57 views
Skip to first unread message

jdaw1

unread,
May 12, 2007, 11:11:39 AM5/12/07
to
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

/TimesNewRomanPS-BoldMT 12 selectfont 72 72 moveto
(www.jdawiseman.com/papers/trivia/glasses.html) dup stringwidth pop /
sw exch def show
mark
/Rect [72 66 72 sw add 85]
/Action << /Subtype /URI /URI (http://www.jdawiseman.com/papers/
trivia/glasses.html) >>
/Border [0 0 0]
/Subtype /Link /ANN
pdfmark

showpage

Aandi Inston

unread,
May 12, 2007, 11:35:08 AM5/12/07
to
jdaw1 <jdawi...@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.

jdaw1

unread,
May 12, 2007, 12:43:16 PM5/12/07
to
Please, how can one test for whether the output is constrained to be
in standard?

jdaw1

unread,
May 12, 2007, 2:59:56 PM5/12/07
to
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?

Aandi Inston

unread,
May 13, 2007, 5:20:38 AM5/13/07
to
jdaw1 <jdawi...@gmail.com> wrote:

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.

jdaw1

unread,
May 13, 2007, 8:16:36 AM5/13/07
to
> 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!

Because the code is written by me, but generally distilled by non-
hackers. www.jdawiseman.com/papers/trivia/glasses.html

I'll investigate currentdistillerparams, into which I have never
before peeked. Thank you for the clue.

jdaw1

unread,
May 13, 2007, 12:45:53 PM5/13/07
to
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

(pstack start) = pstack (pstack end) =

jdaw1

unread,
May 14, 2007, 7:39:04 AM5/14/07
to
Marginal improvement, in that CheckCompliance better handled if an
array containing multiple copies of /None.

% If distiller settings require compliant files,
% RequireCompliantOutput true, otherwise returns false
/RequireCompliantOutput /currentdistillerparams where


{pop currentdistillerparams /CheckCompliance 2 copy known

{get false exch {/None ne or} forall}
{pop pop false}
ifelse} {false} ifelse def % /RequireCompliantOutput
RequireCompliantOutput
{(ISO PDF output: no on-page clickable links)}
{(No PDF standard required: will include on-page clickable links)}
ifelse =

jdaw1

unread,
May 14, 2007, 9:40:20 AM5/14/07
to
That didn't work with an older version of Distiller, so, instead:

% If distiller settings require compliant files,
% RequireCompliantOutput true, otherwise returns false
/RequireCompliantOutput /currentdistillerparams where
{pop currentdistillerparams /CheckCompliance 2 copy known

{get false exch {/None ne {pop true exit} if} forall}
{pop dup /PDFX1aCheck 2 copy known {get} {pop pop false} ifelse
exch /PDFX3Check 2 copy known {get} {pop pop false} ifelse or}


ifelse} {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

jdaw1

unread,
May 14, 2007, 5:09:10 PM5/14/07
to
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

0 new messages