[NTG-pdftex] non-pdf special ignored: <special>

Hans Hagen pragma at wxs.nl
Sat Jan 6 14:07:29 CET 2018


On 1/6/2018 1:22 AM, Karl Berry wrote:
> For ages now, I've been wishing that pdftex output the non-pdf special
> it complains about finding. Often it's obvious, but sometimes it's not,
> and why not report it?
> 
> Does anyone see a problem with this? All I can imagine is that scripts
> trying to parse the output might be unhappy. So we can keep the original
> error message unchanged, exclamation point and all, and just add the
> special text.
> 
> As in something like the below (not tested). Probably better to truncate
> the special text instead of printing the whole thing, as it could be
> annoyingly long, but I'm wondering about the general idea.
> 
> Wdyt? --thanks, karl.
> 
> --- pdftex.web	(revision 791)
> +++ pdftex.web	(working copy)
> @@ -16257,8 +16257,12 @@
>           if not (str_in_str(s, "PDF:", 0) or str_in_str(s, "pdf:", 0)) then begin
>               if warn and not (str_in_str(s, "SRC:", 0)
>                   or str_in_str(s, "src:", 0)
> -                or (length(s) = 0)) then
> +                or (length(s) = 0)) then begin
>                       print_nl("Non-PDF special ignored!");
> +                    print_nl("<special> ");
> +                    slow_print(s);
> +                    print_ln;
> +            end;
>               return;
>           end;
>           j := j + length("PDF:");
sounds ok to me ... about the length: the first 50 chars probably gfive 
enough of a clue (are non pdf specials really that large? maybe blobs of 
ps code but then they have to be collected / collapsed from snippets 
which is not that efficient)

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
-----------------------------------------------------------------


More information about the ntg-pdftex mailing list