Hi Ken,

It seems that the discussion has progressed quite a bit while I was
unable to participate, but I am sending you what we talked about before.
The attached file samples.tar contains the following set:

+--sample.pdf              sample pdf file
+--transcript.txt          log of interaction between AUCTeX and 
Ghostscript(+PDF2DSC); see below
+--sample.prv--+--sampel.dsc generated dsc file
               +--pr-*.png   generated png files

transcript.txt contains
o the command line with which I invoked pdf2dsc
o the command line with which I invoked gs
o the contents I injected as standard input to the invoked gs process
o the responses from the running gs process
, each separated by form feed character (^L).

>>>>> Ken Sharp <ken.sh...@artifex.com> writes:
> I definitely don't want to simply re-instate pdf2dsc.ps; that
> PostScript program basically uses chunks of the old PDF interpreter,
> so it relies pretty much on that interpreter being present. We
> replaced it with a new implementation (in C instead of PostScript) in
> the 10.x series of Ghostscript, and removed the old code entirely in
> (IIRC) 10.01. I'm frankly astonished that the old pdf2dsc.ps program
> continues to work at all, and I suspect it doesn't work properly, but
> the bits that don't work haven't been noticed because they probably
> aren't used.

I understand your opinion.

> So I don't want to just reuse it; at the very least we'll need a new
> PostScript program to produce the 'dsc' files. I can do that for you
> if nothing else. I'd also want to rename the program because 'DSC'
> implies Document Structure Convention and I've already had at least
> one person confused because pdf2dsc didn't do what they expected it
> would from the name. I'd suggest something like pdf2prvw.ps and call
> the output files *.prvw or pdf2auctex or some such thing. Obviously
> that would mean some changes at the AUCTeX end, but from what I've
> heard so far that doesn't sound insurmountable. I think the biggest
> problem would be knowing whether to use the old or new program, might
> have to think about that.

I think AUCTeX can live with that.

> I can produce output from the old program, not least by going back to
> the old 9.55.0 version of Ghostscript if necessary, so I don't need
> that, but it might indeed help matters if you were to provide a sample
> PDF file. Simply because we would be able to discuss it with
> confidence that we are talking about the same thing.

> I would very much appreciate any insight you can give me on point (3),
> how the 'dsc' file is actually used.

Basically, preview-latex scans the generated .dsc file to search
"%%Page:" to find out some information of the .pdf file, and use that
information to build Postscript code to send to Ghostscript process in
order to generate .png files.

> The best we can reasonably do is give you a new program which works
> with the new interpreter.

I would be very helpful for us, thank you.

> OK I think I give up. I'm just going to reinstate the old code, along
> with a note in the comments stating that it isn't supported.

I'm afraid that it wouldn't be helpful because you wrote
> To the best of my knowledge, and I did test it before removal, pdf2dsc
> had stopped working anyway, because it required access to the file
> system, and had to be run with -dNOSAFER. Which is something we wish
> to discourage.
before. If pdf2dsc doesn't work with gs 10.05 and later, reinstatement
of the old code can't be a solution for preview-latex. (By the way, it
is fine with us to add -dNOSAFER option.)

Best regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

Attachment: samples.tar
Description: sample files

Reply via email to