[Top][All Lists]

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

Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex

From: Ken Sharp
Subject: Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex
Date: Fri, 21 Jun 2019 13:21:52 +0100

Good Morning Keita,

At 00:06 21/06/2019 +0900, Ikumi Keita wrote:

> For example, if the PDF file uses black, and the Emacs current colour
> is (eg) green, then you want the PDF rendered as green.

That's right.

> So I'm going to assume this is some highly limited application of PDF
> and Ghostscript where you can guarantee that the PDF file only uses
> the default colour space and colour and never sets any other colours.

Thanks for summarising, it looks sensible to me.

I needed to make sure that the problem I was looking at was what you needed to be addressed :-)

At the moment, I cannot see any way to achieve this. What you are doing with the PDF interpreter is pretty much exactly the sort of thing we have spent time preventing. We really don't want people to be able to modify the PDF interpreter at all.

Not only have we removed access to the dictionary that your code tries to write to, we've made it read-only, and made its parent dictionary read-only as well.

So basically there's no way to allow you to modify the interpreter, and we'd be pretty reluctant to open any back doors for you because, obviously, that simply negates the security altogether.

The way the PDF interpreter works at present it follows the spec, it sets up the initial colour space to be DeviceGray and the initial colour to be 100% black.

We can't alter that, because if we did files which conform to the specification would not render correctly.

I've tried a number of different alternatives but none of them work due, essentially, to the fact that we've taken steps to prevent users doing exactly what you're trying to do.

Before I say definitively I want to discuss this with one of my colleagues who is on vacation today and Monday, so it'll be Tuesday before I get back to it. However I don't want to hold out any false hope; I don't think there's any way to do what you want at present, and I'm certain that nobody is going to be in favour of undoing the security changes.

Is it not possible to alter the production of the PDF file in the first place ?

In step 1 you create the PDF file by using pdflatex. That's not a process I'm familiar with, but it seems to me that if you want to render the PDF file with something other than the default media colour (white) and default stroke/fill colour (black) then you should create the PDF file that way.

Then Ghostscript would render the PDF file in the colours you want.


                        Ken Sharp

reply via email to

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