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

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
Guest  
#1 Posted : Monday, January 11, 2016 11:33:36 PM(UTC)
Quote
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
Hi everyone,

Is it possible to change the color of pdf content ?

Thank you
nwp  
#2 Posted : Tuesday, January 12, 2016 1:11:13 AM(UTC)
Quote
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
Hi
you can change it for viewing, but you can't save it into pdf document

Loo at FillColor and StrokeColor properties here: http://pdfium.patagames.com/help/html/459da43b-c4ab-147f-3131-6e4341e95214.htm
Guest  
#3 Posted : Tuesday, January 12, 2016 2:01:09 AM(UTC)
Quote
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
ok thanks and how can i do that with my viewer for entire document please ?
Nwp  
#4 Posted : Tuesday, January 12, 2016 2:38:16 AM(UTC)
Quote
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
Well... for example ... set the background color for the PdfView control, and then change the color for all objects on the page. The sample code below:

Code:
pdfView1.PdfBackColor = Color.Black;
var page = pdfView1.Document.Pages[pdfView1.CurrentPage];
foreach( var obj in page.PageObjects)
{
    if (obj is PdfPathObject)
    {
        obj.StrokeColor = Color.Green;
        obj.FillColor = Color.Black;
    }
    else
        obj.FillColor = Color.Green;
}


Before and after
before
Guest  
#5 Posted : Tuesday, January 12, 2016 5:10:25 AM(UTC)
Quote
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
thanks a lot !!
Quick Reply Show Quick Reply
Users browsing this topic
Guest (2)
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.