|
Rank: Newbie Groups: Member
Joined: 5/2/2012 Posts: 3
|
We have 2 issues with exporting web pages containing SVG via EO.Pdf: Issue 1: Lib incorrectly renders inline SVG tags. Issue 2: Rendered images have low quality. Steps to reproduce: Try to convert attached file (map.html) using one of the following methods: 1. HtmlToPdf.ConvertUrl("http://example.com/map.html", Path.GetTempFileName()); 2. HtmlToPdf.ConvertHtml(Resources.Map, Path.GetTempFileName()); Here, Resources.Map should contain the html code of attached file. Actual: The result file contains blurred image of map without text legend (attached file map.pdf) Expected: A clear map with a legend. I also have tried to use this settings: HtmlToPdf.Options.PreserveHighResImages = false and HtmlToPdf.Options.JpegQualityLevel = 100, but it didn't help me. Attachments can be downloaded using the following link http://dl.dropbox.com/u/55928141/pdf-export.rar
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Thanks for posting the issue. We will look into it and get back to you as soon as possible.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
This is just to let you know that we are able to reproduce the problem and we are still investigating it.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/2/2012 Posts: 3
|
eo_support wrote:Hi,
This is just to let you know that we are able to reproduce the problem and we are still investigating it.
Thanks! Any updates on this? How long it may take?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have already fixed the missing text legend issue. As to the image quality, we did notice that if you set HtmlToPdf.Options.JpegQualityLevel = 100 the quality of the image improves significantly. However this might because we have a newer build. We are still testing a few issues. Once we are done with that we will provide you an update build for you to verify. You should the new build today.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/2/2012 Posts: 3
|
eo_support wrote:Hi,
We have already fixed the missing text legend issue. As to the image quality, we did notice that if you set HtmlToPdf.Options.JpegQualityLevel = 100 the quality of the image improves significantly. However this might because we have a newer build. We are still testing a few issues. Once we are done with that we will provide you an update build for you to verify. You should the new build today.
Thanks! Perfect. Will be waiting for a new build. Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted the new build. Please see your private message for the download location.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/7/2012 Posts: 12
|
Hi, we have tried this new build and still have issue: when svg wrapped into container with height less than 100%, inline svg tag is rendered with offset. Example:
Code: HTML/ASPX
<html>
<head>
</head>
<body style="width: 920px">
<div style="height: 90%;">
<svg svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink"
version="1.2" baseprofile="tiny" id="svgmapid" class="svgmap" x="0px" y="0px"
viewbox="0 0 950 620" space="preserve">
...
<svg class="svg-legend-items" x="5" y="420">
...
</svg>
</svg>
</div>
</body>
</html>
Please, find attachments here: pdf-export.rar.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, Percentage height is not valid in this context. An HTML page's height depends on the page content's height. So you can not make the page content's height depends on the page's height at the same time. That creates a circular dependency and is invalid. For example, the following percent height is valid:
Code: HTML/ASPX
<body>
<div style="height:1000px">
<div style="width:100px;height:90%"></div>
</div>
</body>
This is valid because the inner DIV's height depends on a known height set on the outer DIV. The following percent height is invalid:
Code: HTML/ASPX
<body>
<div style="width:100px;height:90%"></div>
</body>
It is very important to understand that <body> is not the same as your browser window. <body> element does not have a known height. It's height is determined by its content height, not the window height. In your case, I would recommend you to give your SVG element a fixed size. The HTML to PDF converter is even more sensitive about page height because it needs to split output into multiple pages if necessary; It also senstive to your page width because it will try to automatically shrink your page to fit ont the paper ---- in another word, where your browser tries to display a scroll bar on the window, the HTML to PDF converter will try to get rid of it. That makes it important for you to provide as much size hints as possible. Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/7/2012 Posts: 12
|
Thanks for your reply, but we still have an issue with inline svg tags. Please look at the following example:
Code: HTML/ASPX
<body style="background-color: #fff;">
<div style="width: 454px; height: 436px;">
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.2" id="svgmapid" class="svgmap" x="0px" y="0px" viewBox="0 0 950 620" space="preserve" version="0.48.1 " width="100%" height="100%" docname="northAmerica.svg">
...
<svg class="svg-legend-items" x="30" y="400">
<rect class="svg-legend-background" x="0" y="0" visibility="visible" height="190" fill="white" width="129"></rect>
<rect class="rect1" x="10" y="10" visibility="visible" width="30" height="20" fill="#ffffff"> </rect>
...
</svg>
</svg>
</div>
</body>
Is it valid? Attachments can be downloaded from dropbox
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Thanks for the file. We will look into it and get back to you as soon as possible.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted a new build that fixed this issue. Please see your private message for the download location.
This new build also renders SVG graphics completely in vector format instead of as bitmap. So the new build should also resolve the image quality issue for you.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/7/2012 Posts: 12
|
Thanks for new build. Map looks very good and inline svg also looks perfect. But now we have a problems in svg charts. It renders without background and all lines is too bold. We didn't have such problems before. Please see attachments here: there are 2 html files, containing chart example and 4 pdf files that contains result of export using old and new lib.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Thanks for the additional information. We are working on it.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted another build that fixed the chart issue for you. Please see your private message for the download location.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/7/2012 Posts: 12
|
Big thanks for new build. Everything looks perfect except few things. How can we rid of blue border around chart? Also we have some problems when exporting svg bar and pie charts. There is gray background that overlap the native color background. Please see examples in attachment. Thank you for your help.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted another build that should fix the issues demonstrated in your sample files. Please see your private message for the download location.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/7/2012 Posts: 12
|
Hi, thanks for new build. Almost everything looks pretty good, but it seems that there are some problems. In many svg charts lines and bars are clipped (bars-2.pdf, line-1.pdf, line-2.pdf) or don't available at all(bars-1.pdf). Please look at several issues found in new build. Attachments can be found here.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Please download the new build from our download page. The new build should fix this problem.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/7/2012 Posts: 12
|
Thanks for new build. Everything works fine!
|
|