|
Rank: Newbie Groups: Member
Joined: 10/17/2012 Posts: 5
|
Hi, I work for an IT company and we are trying to evaluate which component shall we use for our products PDF generation features. EO is on the top of the list now but we still have 2 questions: 1/ Our web application is using Fluid CSS (using percentages instead of pixels count for height/width) in order to allow adaption to the user screen. Our tests with EO showed that the converter is using a relatively small window which make the text very close and somehow compressed : instead of Is there a way to specify how big the browser window should be when converting? 2/ What options would allow me to re size pictures inside the page? some of the picture are huge and they get cropped Thank you!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, The easiest way to "resize" the "window" is to put a fixed width element in your HTML. The converter tries to detects the minimum window width automatically. For example, if you have something like this in your page:
Code: HTML/ASPX
<div style="height:1px;width:1000px;">
</div>
Then the converter will see this element has a minimum width of 1000px and will use that width as the "window width" (unless there is something else that's even wider). As to resize picture, I think it's related to your question #1. If you resolve the window width issue. The image should no longer be an issue. If you just want to resize the image, you can just size width and height attribute on your img element. The converter does not have any option for you to alter a specific HTML element. This is necessary so that the converter will render everything the same way as your browser does. As such anything you want to do, you do it in your HTML. Hope this helps. Please feel free to let us know if you have any more questions. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/17/2012 Posts: 5
|
Hi,
For the second question that sound reasonable. For the first I am trying to avoid setting the width explicitly because I would like to keep the fluid design. The good news is that I came up with a solution, which is to make the math on how big my page should be and assign the page size and the output area values. Having 96dpi as the default DPI and wanting to have 1024px as minimum width, that will lead to 11inch as the width and multiplied by the square root of 2 to get the height. It is all then about adding the margin I need. This worked but it would be great if this gets included in the converter options probably in next versions. The other side effect is that the page is bigger than A4 and ScaleToFit is not helping bringing it down since we already explicitly set those value, not sure about the zoom I will try that.
One more thing I just discovered: when using gray scale images (8bit definition), the image is shown blurred. Any workaround for that?
Thank you!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, Thank you very much for the feedback on the page size. We will see what we can do to make it easier. Another way that we could consider is to add an HtmlToPdf.Options.MinPageWidth property. That way you can set that to 1024 directly on the converter without having to change your HTML. Please let us know if that option sounds easier to you. As to changing HTML, there is also a different way to do it. You can add JavaScript code in your HTML to detect whether your page is running inside our converter. If it is running inside our converter, you can show the div that would be used to force the page width. Otherwise that div would have "display:none" and would have no effect if viewed in a browser. You can find more information on our JavaScript interface here: http://www.essentialobjects.com/doc/4/htmltopdf/eo_js.aspxAs to the gray scale image, we are not aware of such issue. can you send us a test project so that we can look into it? We will PM you as to where to send. Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We tested the image file you sent to us and it works fine here.
We need you to ISOLATE the problem into a test project and send us the source code of the TEST PROJECT. We DO NOT need your real project source code. In another word, you must try to duplicate the problem in a separate problem and send that project to us so that we can duplicate the problem here. We can't do much unless we can duplicate the problem here first.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/17/2012 Posts: 5
|
Hi,
I will try to do my best for that.
Thank you for your assistance!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, We have looked into the page width issue again. You can increase the page width by setting HtmlToPdf.Options.ZoomLevel to a value less than 1. For example:
Code: C#
HtmlToPdf.Options.ZoomLevel = 0.5f;
Will double the page width. Hope this helps. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/17/2012 Posts: 5
|
Hi, I uploaded the sample image to http://i50.tinypic.com/5xp1y.jpg (8bit depth picture) please try to use the EO.PDF.Demo application and convert this link. You will get the same issue with blurred images I am still working on preparing a test project. I was suspecting a 3rd party Grid control since in our solution the image is displayed within the grid, but using the link above gives me the same results I have sent you in the email yesterday. Best regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Thanks. We are able to reproduce the problem. So no test project needed. 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 should fix this problem. Please see your private message for the download location.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/17/2012 Posts: 5
|
That is just FABULOUS! Thank you!
It is just a matter of time till Omada becomes a client :) We really appreciate your high commitment and quick answers!
Thank you!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Glad to hear that! Please feel free to let us know if there is anything else.
|
|