Hi Christian, Thanks, as always, for your prompt response.
> Well, you may want to use the other class for setting. I’m trying to get that to work, but it seems that my intervention is totally ignored. What I’m trying to do is to set the blend mode to “DynaPDFMBS.kbmMultiply” whenever the GState is set to either overprint stroke or overprint fill. Here is my code: > Sub SetExtGState(ObjectPtr as integer, GS as DynaPDFExtGState2MBS) > if GS.OverPrintFill = 1 OR GS.OverPrintStroke = 1 then > dim h as integer // handle > dim state as new dynapdfExtGStateMBS > state.AlphaIsShape = GS.AlphaIsShape > state.BlendMode = DynaPDFMBS.kbmMultiply > state.AutoStrokeAdjust = GS.AutoStrokeAdjust > state.FillAlpha = GS.FillAlpha > state.FlatnessTol = GS.FlatnessTol > state.OverPrintFill = GS.OverPrintFill > state.OverPrintStroke = GS.OverPrintStroke > state.OverPrintMode = GS.OverPrintMode > state.RenderingIntent = GS.RenderingIntent > state.SmoothnessTol = GS.SmoothnessTol > state.SoftMask = GS.SoftMask > state.SoftMaskNone = GS.SoftMaskNone > state.StrokeAlpha = GS.StrokeAlpha > state.TextKnockout = GS.TextKnockout > > h = me.pdf.CreateExtGState(state) > > if NOT me.pdf.SetExtGState(h) then > break > end if > end if > End Sub > (Note that this is a subclass of DynaPDFParseIntefaceMBS which has a private property “pdf as DyanPDFMBS” which is the DyanPDFMBS to which “me.pdf” refers.) I parse the PDF immediately before rasterizing it with “RenderPage" Putting a breakpoint in this method shows that the condition (GS.OverPrintFill = 1 OR GS.OverPrintStroke = 1) IS being hit, and the call to pdf.SetExtGState does NOT return an error. And yet, the rendition of the page is exactly the same as it is without this implemented - the objects which were set to overint are not rendered with a blend mode of multiply. Do you have an example project that demonstrates setting the blend mode? Cheers, -- Peter Truskier Premedia Systems, Inc. Oakland, CA USA > On Oct 14, 2015, at 11:05 AM, Christian Schmitz > <[email protected]> wrote: > > >> On 14 Oct 2015, at 19:37, Peter Truskier <[email protected]> wrote: >> >> I am trying to implement changing the blend mode of a PDF object within the >> SetExtGstate event of a DynaPDFParseIntefaceMBS object, and I have a few >> questions: > > Well, DynapdfExtGState2MBS is just an extended version of DynapdfExtGStateMBS. > >> 1. What is the “index” parameter? How can a Graphics State have multiple >> blend modes? > > Looks like this is possible. > >> 2. I am able to GET the BlendMode(0) value which is, usually and reasonably, >> 1 or kbmNormal. > > good. > >> 3. How do I SET the blend mode? If I try to do something like this: > > The DynapdfExtGState2MBS with 2 is just for getting values. > To create a blend mode, you need to use DynapdfExtGStateMBS class. > >> In the original version of the extended GState object (DynapdfExtGState2), >> BlendMode seems to be a simple read/write property. >> >> Can I do this? If not, why? What am I missing? > > Well, you may want to use the other class for setting. > DynaPDF can read more properties than it can write. > > Sincerely > Christian > > -- > Read our blog about news on our plugins: > > http://www.mbsplugins.de/ > > _______________________________________________ > Mbsplugins_monkeybreadsoftware.info mailing list > [email protected] > https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
