Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF text rendering issues Options
Max
Posted: Monday, February 20, 2017 9:56:53 AM
Rank: Newbie
Groups: Member

Joined: 9/14/2016
Posts: 2
Hello, I have the 2017 Corporate Bundle, using EO.PDF version 17.0.64.0

I'm testing with all the default settings and trying to render a very simple PDF with the below HTML. The text "Team" is getting overlapped with the text "School". It seems like the issue is only happening depending on the length and characters used. I've tried changing every option I could think of, including using something other than a <p> element, but the text keeps getting jumbled up no matter what I try. Any advice?

Code: HTML/ASPX
<p>Testing simple text rendering using EO.PDF for my Middle School Team<p>


Note: the text renders fine in version 16.2.1


eo_support
Posted: Monday, February 20, 2017 10:49:48 AM
Rank: Administration
Groups: Administration

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

This must have something to do with other contents (usually CSS) in your page. You can try a number of difference things:

1. Try the above HTML with our online demo:

https://www.essentialobjects.com/Products/EOPdf/HtmlToPdf.aspx

We tested it and it works fine.

2. Try our PdfDemo application with the same HTML and see if you see the problem. If you don't see the problem there, you can try to compare your code with our code and see what triggers the issue. Usually if you find the trigger the cause will become obvious to you;

3. Try to set HtmlToPdf.Options.ZoomLevel to a value less than 1 (for example, to 0.5f). This will increase the pixel size of the internal browser window. Some page does not work well if the browser window is too small.

Please let us know what you find.

Thanks!
Max
Posted: Monday, February 20, 2017 11:27:40 AM
Rank: Newbie
Groups: Member

Joined: 9/14/2016
Posts: 2
Hi, thanks for the quick reply :)

I'm converting the PDF using the below code, so I don't believe it's using any CSS. It does work in your demo, but I'm thinking maybe your demo is using CSS or a different .NET version making it render differently. I did try setting the zoom level to 0.5f, but it had no affect on how the text was overlapping.

Interestingly, I tried to wrap the HTML in <pre></pre> elements, and it works (although the font looks a bit ugly).

Code: C#
var html = "&lt;p&gt;Testing simple text rendering using EO.PDF for my Middle School Team&lt;p&gt;";
var pdf = new PdfDocument();
HtmlToPdf.ConvertHtml(html, pdf);

return pdf;
eo_support
Posted: Monday, February 20, 2017 12:36:21 PM
Rank: Administration
Groups: Administration

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

It shouldn't be. Our demo application does not use any extra CSS. There has to be something different in your application. If you still have problem, try to isolate the problem into a test project and send the test project to us:

https://www.essentialobjects.com/forum/test_project.aspx

Once we have that we will be happy to investigate further.

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.