PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu May 09, 2024 12:30 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Transparency!!
PostPosted: Mon Feb 23, 2009 3:58 pm 
Offline

Joined: Mon Feb 23, 2009 3:53 pm
Posts: 3
Hi everybody...i am trying to covert to pdf from a component that i have to draw...

I am exporting some shapes to a png picture file and after trying to importing into the pdf file....but the images are non transparent!!!

How can i get it??

The pictures files are png and are transparents!!!

I am using this:

Code:
document = new PdfDocument();
page = document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page, XGraphicsPdfPageOptions.Append);               
XImage image = XImage.FromFile(path);
gfx.DrawImage(image, new XRect(posx, posy, posw, posh));


Thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Feb 23, 2009 4:10 pm 
Offline

Joined: Mon Feb 23, 2009 3:53 pm
Posts: 3
Well..i think my problem is that i need to put one image over other...i mean...i import one image that cover all document page...as a background and over it i need to import other images but need to be transparent but i find out that the images are imported as a white rectangle...

thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Feb 24, 2009 8:08 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
Make sure to set PDF version to 1.4 (or higher) if you use images with transparency. (1.4 is the default with PDFsharp 1.2).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Feb 24, 2009 9:46 am 
Offline

Joined: Mon Feb 23, 2009 3:53 pm
Posts: 3
well, when i show the document.Version...is 14...so i think that's the version!!

The dll file is PdfSharp.dll and the version is 1.2.1269.0

But is it possible to show one image over other without white spaces between??

Can anyone send me an example or something...? i can even send you my images to test it!!!

Many thanks


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 75 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group