[poppler] Implement overprint in qt interface?

Adam Reichold adamreichold at myopera.com
Sun Oct 14 22:25:54 PDT 2012


Hello,

On 15.10.2012 07:15, Thomas Freitag wrote:
> On 14.10.2012 22:58, Albert Astals Cid wrote:
>> El Diumenge, 14 d'octubre de 2012, a les 19:41:26, Thomas Freitag va
>> escriure:
>>> On 14.10.2012 17:21, Albert Astals Cid wrote:
>>>> El Diumenge, 14 d'octubre de 2012, a les 13:47:29, Thomas Freitag va
>> escriure:
>>>>> Hi folks!
>>>>>
>>>>> Is there anybody in the community who wants the possibility to
>>>>> simulate
>>>>> overprint in qt library?
>>>>> With the implementation of DeviceN support in splash this is quite
>>>>> easy
>>>>> now, so I can upload a patch.
>>>> Sure, why not? Let's see the patch :-)
>>> Okay, here it is.
>> The two new methods are missing @since markers (and also i think the
>> documentation of the two methods could be a bit more explanatory)
> @since: I thought that You insert it when You commit it. If I would
> insert 0.22.0 You have to change it if You will not have the time to
> commit it :-) or I need to change it and have to upload a new patch if
> You will not have the time :-(
> Explanatory: Okay, but this will be hard. For those who know what
> overprint is the documentation is self-explanatory, for others I need to
> write reams. What's about to insert the link to
> http://en.wikipedia.org/wiki/Overprinting?
>>
>> Also why are you calling it "overprint preview"? How is it a preview?
> To be honest, I haven't really thought about that. Probably I choose
> that name because it is also introduced in GlobalParams with that name.
> But also in the acrobat reader preferences it is called "Use overprint
> preview". And because not all RIPs support it (i.e. RGB printers) it is
> indeed something like a preview (for RIPs which support it).

I'd say that insofar as this simulates the subtractive colour mixing
that layer of colour in actual print will display which is as you said
not really possible using the additive colour mixing of computer
monitors, the displayed output is a mathematical simulation or a preview
of the real physical effect in printing.

>>
>> Given that overprint only works if defined(SPLASH_CMYK) you should
>> make the
>> setter return a boolean that says if the set worked or not (i.e. make
>> it fail
>> if !defined(SPLASH_CMYK))
> Gotcha. I thought about that and disable / enable the option in okular
> if the format generator doesn't support it. But because I'm not familiar
> enough with okular I defered it and then forgot it...
> I'll insert it in QT when I get answers to the other points.

Another option would be to expose this via the RenderHints flags? But of
course, this couldn't return a bool as this would have to change the
signature of Poppler::Document::setRenderHint.

But considering how this will be used: Wouldn't it be better to have
something like "static bool supportsOverprintPreview()" because I want
to check whether this is enabled before I try to set it. (E.g. not even
showing the user this option as Thomas suggested.) (This could also be
combined with the IMHO cleaner RenderHints approach.) (And since the
value of SPLASH_CMYK is known at build-time, maybe this could just as
well be exposed as a preprocessor definition, like
POPPLER_QT4_OVERPRINT_PREVIEW?)

Best regards, Adam.

P.S.: Btw., I think it would make sense to call the threadsafe define
"POPPELR_QT4_THREADSAFE" instead of "POPPLER_QT_THREADSAFE" as well
since there might be another Qt frontend sometime in the future with
different threading properties.

> Cheers,
> Thomas
>>
>> Cheers,
>>    Albert
>>
>>> In a few places it has already a similar
>>> implementation than in bug 50992 (thread safe), because changing the
>>> overprint option also meant that we need a different SplashOutputDev
>>> instance. But You probably also want to test it in okular? Even if we
>>> are here not on an okular list, I attach the okular patch here, too.
>>> Also here, it has already the changes from bug 50992. But because
>>> POPPLER_QT_THREADSAFE is not defined here, it doesn't make any
>>> difference, so I let these changes as they are. BTW, I'm not really
>>> familiar with qt programming, so most changes in okular are more or less
>>> a (hopefully) best guess.
>>>
>>> Cheers,
>>> Thomas
>>>
>>>> Cheers,
>>>>
>>>>     Albert
>>>>> For everybody who doesn't know anything about overprint I attach three
>>>>> screenshots which shows the implementation in okular.
>>>>> (This is not fake, I made a small apprentice piece today morning :-) )
>>>>>
>>>>> Cheers,
>>>>> Thomas
>>>> _______________________________________________
>>>> poppler mailing list
>>>> poppler at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>>
>>>> .
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>
>> .
>>
> 
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list