|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
Hi, We're using your EO.Pdf on our asp project. We're using inline SVG on webpage. If we rotate image at any angle we get pdf file with wrong image. For example: Our webpage Pdf file with wrong image
Code:
<div id="Part_Outside_Left" style="position: relative;"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="623" height="556"> <desc>Created with Raphael</desc> <defs> <image x="0" y="0" width="623" height="556" preserveAspectRatio="none" href="/Parts/outside_background.png"> <image x="227.989345" y="133.851809" width="373.5000878336" height="280.1250658752" preserveAspectRatio="none" href="/Temp/Koala0.jpg" transform="rotate(45, 414.738, 273.914)"> <image x="0" y="0" width="623" height="556" preserveAspectRatio="none" href="/Parts/buttom_left.png"> </svg> </div>
Have you any ideas? Many thanks, Dmitry
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
This looks like a bug. We are looking into it and will get back to you as soon as possible.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, We have confirmed this is a bug when HtmlToPdf.Options.PreserveHighResImages is enabled (it's enabled by default). You can try the following workaround and see if it works for you:
Code: C#
//Disable preserving high resolution images
HtmlToPdf.Options.PreserveHighResImages = false;
//The default JPEG quality level is about 75. This is not good enough
//when the image is rotated. Alternatively, you can also disable jpeg
//image compression altogether by setting SaveImageAsJpeg to false
HtmlToPdf.Options.JpegQualityLevel = 100;
//Convert your HTML, this should produce the correctly rotated
//image
HtmlToPdf.ConvertUrl(url, doc);
PreserveHighResImages tries to automatically preserve your image resolution. For example, if your image is 300dpi, then it will be saved as 300dpi in your PDF file. This is good when the image quality is important (especially if you plan to print it). When PreserveHighResImages is false, the images are saved as screen resolution (usually 96 dpi). Screen resolution is usually good enough for viewing but may not be good enough for printing. We will work to fix this when PreserveHighResImages is set true and let you know once a fix is available. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
Thanks for quick answer! This Is right, we have the template image 300 dpi. The image quality is important for us, because we will be print image. Please, let us know when the fix will be to available .
Many thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
No problem. Can you still confirm whether the workaround produce the right image for you? Not that we wanted you to use the workaround, but we wanted to make sure we didn't miss anything when we fix the problem.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
I have tried to set HtmlToPdf.Options.PreserveHighResImages = false, this is working fine, but the quality image is very bad and this solve don't suitable for us.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Yes. I understand the workaround is not suitable for you. I just wanted to make sure that we are seeing the same result. Thank you very much for confirming that! We will fix the problem as soon as possible and hopefully can give you an update build early next week.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
Many thanks! I will be wait the fix.
|
|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
I have loaded new version. I see, in the new version this bug was fixed? Many thanks for the quick fix.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Yes. This issue was fixed in the new version. Was about to notify you today but you went ahead of us. ; )
Please feel free to let us know if there is anything else.
Thanks!
|
|