PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

Graphics.DrawImage
http://forum.pdfsharp.de/viewtopic.php?f=2&t=1512
Page 1 of 1

Author:  RoyT [ Tue Jan 18, 2011 1:29 pm ]
Post subject:  Graphics.DrawImage

Hi

I am using PDFSharp to generate a pdf document from vb.net and I am very pleased with the result except............

I have one image that I am using to provide a front cover for a document. It takes up a whole page of A4. It generates OK but it is in negative (black = white, etc).

All my other images in the document generate fine.

Is this something to do with the size? How can I get round this?

All my images are jpgs

I tried to upload the document but there is a limit of 256Kb and my document is larger than this.

Thanks in advance for your help

Roy Thompson

Author:  Thomas Hoevel [ Tue Jan 18, 2011 1:51 pm ]
Post subject:  Re: Graphics.DrawImage

Hi, Roy!
RoyT wrote:
Is this something to do with the size?

This is not a size problem.

Maybe it's an unusual JPEG files (e. g. CMYK format).

Try PDFsharp 1.31.
Then switch from WPF build to GDI+ build or vice versa and look if it makes a difference.

If the problem persists, please send us a copy of the image (I'll send you a PM).

Author:  RoyT [ Tue Jan 18, 2011 4:08 pm ]
Post subject:  Re: Graphics.DrawImage

Hi Thomas

I think I may have cured it.

It seems my client has sent me a corrupt jpg. For some strange reason it looks fine when previewed in Paint or whatever but goes negative in PDFSharp.

I opened the jpg in Irfanview and saved it again as a jpg and it all worked fine after that.

Thanks for your time

Roy

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/