PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 7:47 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: DRAWIMAGE
PostPosted: Tue Jan 05, 2010 1:34 pm 
Offline

Joined: Tue Jan 05, 2010 1:00 pm
Posts: 1
Hello!
When i use
Dim page As New PdfPage()
Dim image As XImage = XImage.FromGdiPlusImage(timage)
Dim maxsize As Integer = Math.Max(w, h)
page.Width = timage.Width
page.Height = timage.Height
mydoc.Pages.Add(page)
Dim xgr As XGraphics = XGraphics.FromPdfPage(mydoc.Pages(mydoc.Pages.Count - 1))
xgr.DrawImage(image, 0, 0, timage.Width, timage.Height)
xgr.Dispose()
timage.Dispose()
The document that I create it is ok, but the page with a big image (5000x20000) is correctly dimesioned, but is blank....
The image is jpg. With tif function.
Hav an idea?
Thanks a lot


Top
 Profile  
Reply with quote  
 Post subject: Re: DRAWIMAGE MAX SIZE
PostPosted: Tue Jan 05, 2010 3:19 pm 
Offline

Joined: Mon Jan 04, 2010 2:44 pm
Posts: 23
Are page.Width and page.Height the same units as timage.Width and timage.Height?
Is, for example, the latter in pixels and the former in points?

(Also, you failed to declare timage in that snippet.)


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 373 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