PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

[MigraDoc:] Images are blurry in PDF-Document
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3518
Page 1 of 1

Author:  JoseMan [ Wed Dec 21, 2016 2:56 pm ]
Post subject:  [MigraDoc:] Images are blurry in PDF-Document

Hi there,

MigraDoc is a very cool library but I have a big problem.
I export images (bmp, pdf, etc) to my pdf-document. When I open my doucument or print it out my images are a kind of blurry.

Here is a screenshot.
Attachment:
blurry.png
blurry.png [ 27.91 KiB | Viewed 2937 times ]


Did anyone knows this problem? Can anyone help me?

Greez and best regards
JoseMan

Author:  TH-Soft [ Wed Dec 21, 2016 5:31 pm ]
Post subject:  Re: [MigraDoc:] Images are blurry in PDF-Document

Hi!
JoseMan wrote:
When I open my doucument or print it out my images are a kind of blurry.
MigraDoc includes the images unaltered. Adobe Reader tries to optimise the images.

Use
Code:
image.Interpolate = false;
to disable this optimisation.

Author:  JoseMan [ Thu Dec 22, 2016 6:45 am ]
Post subject:  Re: [MigraDoc:] Images are blurry in PDF-Document

Hi TH-Soft,

thanks for your replie, but this method doesn't exist.
Maybe I've got an old version?
I use the image-class from MigraDoc:
Code:
MigraDoc.DocumentObjectModel.Shapes.Image image = section.AddImage(memoryStream);


Greez

Author:  TH-Soft [ Thu Dec 22, 2016 2:22 pm ]
Post subject:  Re: [MigraDoc:] Images are blurry in PDF-Document

JoseMan wrote:
thanks for your replie, but this method doesn't exist.
Sorry, my fault. This is a property of PDFsharp's XImage class and you cannot set it from MigraDoc yet.

If you use the MigraDoc source code, set this option to false in the XImage class.

For a quick test you can disable image smoothing in the Adobe Reader options.

Author:  JoseMan [ Fri Dec 23, 2016 12:19 pm ]
Post subject:  Re: [MigraDoc:] Images are blurry in PDF-Document

Okay. Thanks...I'll try it

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