|
Rank: Newbie Groups: Member
Joined: 3/10/2014 Posts: 7
|
Hello Support We are seeing an issue when we export a page where borders seem to get a pixel or two added to their width. I've linked to a screenshot to illustrate the problem. We add the border using a border-bottom style from an external style sheet. Below are some workarounds that we have tried to no avail. Attempted Workarounds: Create a 1px div and use background img of the color wanted In-line style instead of external Small table instead of div Background color instead of border HTML and CSS used: <div class="reportHeader" style="font-weight:bold; font-size: 13px;font-style: italic; border-bottom: 1px solid #DBC794; margin-top: 20px;">Month - End Summary</div> Please advise how we can fix this problem. Example
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
There isn't a lot can be done for the line width. The root of the problem is PDF uses a logical float width value, so it is not always pixel accurate. For example, a line that is meant to be 1 pixel width might somehow get a float coordination of 0.5 - 1.5 after various transforms (for example, Adobe Reader's zoom level). In this case Adobe Reader can decide to render it from 0 to 1 to give you a one pixel wide line, or 0 to 2, which gives a 2 pixels wide line. Adobe doesn't view this as a big problem since from the very beginning PDF has been using logical float coordinate and not only people are used to it, but also it produces very good result on high resolution devices (for example, a good printer). The pixel accurate issue only gets attention when people starts to convert HTML to PDF because traditionally people in the HTML world cares a lot more about pixel accurate rendering.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 2/21/2013 Posts: 12
|
Hello eo_support,
I also work with Jordan and we tried a number of different approaches. One being a repeated background and another by using a 1px image with 100% width. Each attempt still gives inconsistent results
thanks, Chris
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi csalle01,
As we have already explained in our previous post, it is not possible to have consistent pixel accurate line width in PDF because PDF does not use pixel coordinations.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 3/10/2014 Posts: 7
|
So you're saying there's no possible way to get a consistent border width using this framework?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We are saying it's not possible to get a consistent pixel accurate border with PDF when you convert from HTML. As already explained, it has nothing to do with our library. The root of the problem is PDF does not use pixel coordination. So there is no way for you to force a pixel accurate coordination onto it.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 2/21/2013 Posts: 12
|
We are looking into this issue again because it has become major problem for our clients. We have html/css based reports and it is essential for our generated pdfs to be a 1:1 match. However this is not the case because all borders widths get randomly generated. It does not make sense to me how one border is thin and the other is thick even with the same exact css applied and passed to your library. We have even tried converting all pixels widths to point based widths.
Has there been a fix to this in the recent version of your library? There does seem to be inconsistencies on how html gets renders in PDF.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
csalle01 wrote:We are looking into this issue again because it has become major problem for our clients. We have html/css based reports and it is essential for our generated pdfs to be a 1:1 match. However this is not the case because all borders widths get randomly generated. It does not make sense to me how one border is thin and the other is thick even with the same exact css applied and passed to your library. We have even tried converting all pixels widths to point based widths.
Has there been a fix to this in the recent version of your library? There does seem to be inconsistencies on how html gets renders in PDF. Hi, Can you try to isolate the problem into a test project and send the test project to us? See here for more details: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Member Groups: Member
Joined: 2/21/2013 Posts: 12
|
Is that link you sent correct? It is pointing me back to this thread.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
I apologize. It has been corrected now.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We tested your code with the latest build and it seems to work fine. We did have to comment out some code since the code you sent to us does not compile. You may want to try the latest build and see if it works for you. When you try the latest build please make sure you do NOT apply your old license key. You will get an exception if you apply the old license key.
If the problem still occur with the latest build, then it is possible that we did not see where the problem is. In that case please explain exactly which line is the wrong width. You may want to mark it on an image/screenshot and email it to our support email address. That way we can understand clearly what you were refering.
Thanks!
|
|