[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] passing groff special chars to pdfmark as bookmarks

From: smoore
Subject: Re: [Groff] passing groff special chars to pdfmark as bookmarks
Date: Sat, 15 Sep 2012 21:58:57 -0600
User-agent: Webmail 6.0


First pass at it returns the following:

gs -q -dNOPAUSE -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFFitPage
-dPermissions=-4 -dBATCH -sOUTPUTFILE=ztest.pdf ztest_.pdf

postscript files produced with groff -mpdfmark

gs dumps an error:

ERROR: /syntaxerror in pdfopenOperand stack:  
(%PDF-1.4\n%\342\343\317\323\n)Execution stack:   %interp_exit  
.runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--  
--nostringval--   --nostringval--   false   1  
%stopped_push   1   3   %oparray_pop   1   3  
%oparray_pop   1   3   %oparray_pop   --nostringval--  
--nostringval--   --nostringval--   --nostringval--Dictionary
stack:   --dict:1140/3371(ro)(G)--   --dict:0/20(G)--  
--dict:108/200(L)--   --dict:108/200(L)--  
--dict:104/127(ro)(G)--   --dict:241/347(ro)(G)--  
--dict:7/15(L)--Current allocation mode is localESP Ghostscript 8.15.3:
Unrecoverable error, exit code 1

I notice during the groff run to produce the _.pdf that I get numerous
a special character is invalid within \X

which by your indication tells me I am not using the -Tpdf driver .. so Ill go
in and check that, however the header error says Ive got a pdf file, and it
seems to me that with or without -Tpdf gs ought be able to accomodate.

I also get that my gs is quite old, so Im upgrading and will try again with
9.05 and see what happens.

On Mon, 10 Sep 2012 15:40:08 +0100, Deri James
<address@hidden> wrote:
On Monday 10 Sep 2012 06:53:38 address@hidden wrote:
> Is it the single quote apostrophe that is causing the problem, or, is
> it something
> else ?   Were I to pass the string with the french special character
> \['e] it is the
> 'é' that gets dropped and for the word Séance I get Sance as a bookmark.
> > Is the string that gets passed after the trin an \[\[aq]e] ?
> > The goal is to have all diacritc chars flow through without being
dropped. > Removing the .trin has no substantial effect apart from
the appearance of the apostrophy in "l'avant-midi".

The missing eacute from seance is due to the warnings you are getting
when you run groff:-

With postscript driver:-

t.trf:11: a special character is invalid within \X

With pdf driver:-

t.trf:10: can't translate character code 233 to special character
`'e' in transparent throughput

These both relate to the presence of the eacute character. The
difference is the postscript version does not action the bookmark
until the .pdfsync command, so the error is reported for line 11
rather than 10.

The difference in the two warnings is related to the way in which the
bookmark data is communicated to grops and gropdf. Grops uses the \X
escape and gropdf uses the \! escape. It seems the \X warning
suppresses the character and the \! passes the character through. The
reason this is a problem in either case is because at the point the
bookmark is created the eacute has been converted to a node holding a
glyph name rather than a node holding text. It is interesting to note
that if you embed the char 233 directly into the text (with my uk
keyboard) by pressing [Alt Gr] then [e] then [’] the postscript
driver works perfectly. Try the attached with "groff -mpdfmark t.trf
| ps2pdf - - | okular -".

I hope this helps.

What results did you get from re-distilling the pdf produced by the
native pdf driver through ghostscript using your custom gs settings?

Cheers Deri

reply via email to

[Prev in Thread] Current Thread [Next in Thread]