Welcome Guest Search | Active Topics | Sign In | Register

Incorrect colors on the generated image Options
Galaxy Media, LLC
Posted: Thursday, March 3, 2016 2:35:39 PM
Rank: Newbie
Groups: Member

Joined: 3/3/2016
Posts: 5
Hello,

I used the following code to generate Image:

//Set output page size to 6.8 by 12.7 inches
EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(floatWidth, floatHeight);

////Set margins to 0 inch on all sides
EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0f, 0f, floatWidth, floatHeight);

//specify visible elements IDs:
HtmlToPdf.Options.VisibleElementIds = "container;crvotes;";


//Generates page images
HtmlToPdf.Options.GeneratePageImages = true;

//Specifies whether to automatically save images as JPEG.
HtmlToPdf.Options.SaveImageAsJpeg = true;

var result = HtmlToPdf.ConvertUrl(requestUrl, imagePdfPath);

result.PageImages.First().Save(imageJpgPath);

I get expected result with a pdf file:
http://screencast.com/t/fFJfk74nr

but my image looks horrible. Colors are inverted and letters have bad quality:
http://screencast.com/t/sEe3Gm80

Am I doing something wrong? I need my image to be the same as the generated pdf file

Could you help me with that?
eo_support
Posted: Monday, March 7, 2016 11:58:02 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

Please download the latest build (2016.0.17.0) from our download page and see if that resolves the issue for you. If that still does not work, please provide the page Url so that we can investigate further. If you do not wish to post the Url in the forum publicly, you can PM us with the information.

Thanks!
Galaxy Media, LLC
Posted: Tuesday, March 8, 2016 6:07:05 AM
Rank: Newbie
Groups: Member

Joined: 3/3/2016
Posts: 5
Hi,

We are using 2016.0.17.0 currently.
Unfortunately I cannot give you the same page I'm testing currently because we are developing it. But I was able to reproduce the same issue using one of our pages on production:
http://www.conservativereview.com/members/mike-lee/

Note, you will need to remove VisibleElementIds since we don't have corresponding IDs there
eo_support
Posted: Tuesday, March 8, 2016 8:23:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Thanks for the test Url. We are able to reproduce this problem on our end. Please keep the test Url valid and we will look into this and get back to you as soon as possible.
eo_support
Posted: Saturday, March 12, 2016 9:01:08 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

We have posted a new build (2016.0.21.0) that should fix this problem. Please download the new build from our download page and let us know if it works for you.

Thanks!
Galaxy Media, LLC
Posted: Monday, March 14, 2016 6:46:00 AM
Rank: Newbie
Groups: Member

Joined: 3/3/2016
Posts: 5
Hi,

I'm having one issue using the new version. i get the following exception when i try to convert URL(HtmlToPdf.ConvertUrl(url, imageFilePath))

An exception of type 'System.IO.FileLoadException' occurred in EO.Pdf.dll but was not handled in user code

Additional information: Could not load file or assembly 'EO.WebEngine, Version=16.0.21.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Is it possible that an outdated reference was left in the EO.Pdf project? I cannot find anything that could cause such behavior on my side and I'm pretty sure all assemblies I use have 2016.0.21.0 version.
eo_support
Posted: Tuesday, March 15, 2016 8:30:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

I do not believe there is outdated reference in our DLL. You can verify this by running our own TabbedBrowser sample application on your machine and you see it works fine. So there must be something else in your project that is still referencing the old dlls somewhere.

Thanks
Galaxy Media, LLC
Posted: Wednesday, March 23, 2016 8:37:08 AM
Rank: Newbie
Groups: Member

Joined: 3/3/2016
Posts: 5
Hi,

I forgot to post an update here. It appears that I needed to add a reference to EO.WebEngine to my project. I'm pretty sure the previous version worked without it... Anyway, it works now. Thank you for your help!
eo_support
Posted: Wednesday, March 23, 2016 3:50:11 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

Thanks for the update. Yes, the 2016 version needs both EO.WebEngine.dll and EO.WebBrowser.dll. See here for more details:

http://www.essentialobjects.com/doc/pdf/install/deploy.aspx

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.