logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
bdavid  
#1 Posted : Saturday, May 1, 2021 6:27:33 AM(UTC)
bdavid

Rank: Newbie

Groups: Registered
Joined: 5/1/2021(UTC)
Posts: 2
Italy
Location: Milan

Hi to all,

I need to implement a new option in my sw. Receiving pdfs with multilayer(OCG) I have to render them with overprint flag in order to prevent some layer cover other.
I tried using :
Code:
                    
foreach (var pgobj in page.PageObjects)
{
    pgobj.OverprintMode = OverprintModes.NonZero/Zero;
    pgobj.StrokeOverprint = true/false;
}

Nothing change in the saved image, the last layer cover others.....

David

Edited by moderator Saturday, May 8, 2021 9:34:41 PM(UTC)  | Reason: Not specified

Paul Rayman  
#2 Posted : Saturday, May 8, 2021 9:38:32 PM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,011

Thanks: 5 times
Was thanked: 121 time(s) in 118 post(s)
After changing any property of the page object, you must call the GenerateContent method for the changed information to take effect.
Try calling page.GenerateContent() after your foreach loop.
bdavid  
#3 Posted : Sunday, May 9, 2021 5:50:35 AM(UTC)
bdavid

Rank: Newbie

Groups: Registered
Joined: 5/1/2021(UTC)
Posts: 2
Italy
Location: Milan

Sorry Paul,

but nothing change can I send you the pdf to check if it's possible to render it correctly?

David
Paul Rayman  
#4 Posted : Sunday, May 9, 2021 7:57:19 AM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,011

Thanks: 5 times
Was thanked: 121 time(s) in 118 post(s)
Please contact support@patagmes.com
gffranca  
#5 Posted : Thursday, September 16, 2021 3:53:44 PM(UTC)
gffranca

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 13
Brazil
Location: Rio de Janeiro

Thanks: 2 times
Hi,
I'm trying to load the document with overprint flag ON, but have no success yet.

Here is my code:

Code:

foreach (var page in pdfViewer.Document.Pages)
{
     foreach (var pgobj in page.PageObjects)
     {
          pgobj.OverprintMode = Patagames.Pdf.Enums.OverprintModes.NonZero;
          pgobj.StrokeOverprint = true;
          pgobj.FillOverprint = true;
     }
     page.GenerateContent();
}
pdfViewer.ClearRenderBuffer();
pdfViewer.Invalidate();

Thanks in advance!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.