|
Rank: Newbie Groups: Member
Joined: 9/20/2011 Posts: 3
|
Hi, I used the object to generate pdf from html, which contains a logo at the top of the page. On the print-out of the pdf, the logo is in poor quality. I tried to replace it with a bigger image and set the "width" attribute to control the display size. But the printing quality is still bad. Did I miss something? Grateful if you can advice. Thanks in advance.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will need to use the following method to render high quality images: 1. Skip images while calling HTML to PDF converter. This can usually be done by applying img {visibility: none } CSS style. This will skip all images (or you can just apply it on your logo image if you only wish to skip the logo image) but still reserves spaces for them; 2. Use the HtmlToPdfResult object returned by the HTML to PDF converter to find out the image location; 3. Use "PDF Creator" interface to fill in high quality image at the location returned by step 2;
A working sample (All Demos -> Html to PDF -> Advanced -> High Resolution Image) is provided in the sample project to demonstrate this method. You can view the full source of the sample to see how it works.
Hope this helps. Please feel free to let us know if you still have any questions.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/20/2011 Posts: 3
|
Thanks for your prompt reply. Could you please let me know the link to download the sample project you mentioned? Thanks again. eo_support wrote:Hi,
You will need to use the following method to render high quality images: 1. Skip images while calling HTML to PDF converter. This can usually be done by applying img {visibility: none } CSS style. This will skip all images (or you can just apply it on your logo image if you only wish to skip the logo image) but still reserves spaces for them; 2. Use the HtmlToPdfResult object returned by the HTML to PDF converter to find out the image location; 3. Use "PDF Creator" interface to fill in high quality image at the location returned by step 2;
A working sample (All Demos -> Html to PDF -> Advanced -> High Resolution Image) is provided in the sample project to demonstrate this method. You can view the full source of the sample to see how it works.
Hope this helps. Please feel free to let us know if you still have any questions.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The sample is already on your machine. Go to Start -> All Programs -> EO.Pdf 2011.2 -> Samples. You will find both the compiled exe and full source code along with Visual Studio project files.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/20/2011 Posts: 3
|
eo_support wrote:Hi,
The sample is already on your machine. Go to Start -> All Programs -> EO.Pdf 2011.2 -> Samples. You will find both the compiled exe and full source code along with Visual Studio project files.
Thanks! It works great! Thanks a lot for your prompt assistance.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have posted a new build (2011.2.71) that will do this automatically. You can download the new build from our download page.
Thanks!
|
|