|
Rank: Newbie Groups: Member
Joined: 10/16/2012 Posts: 3
|
I have a particular report that we transform using ASPX to PDF where some text is all compressed like if it was transformed into a low resolution image. Is there something I can do? Everything is correct when in ASPX.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
That's normal. It depends on whether the text is rendered as text or it is rendered as image. The converter will try its best to always render text as text, but sometimes it can only render them as image. When a text is rendered as image, it is rendered at screen resolution. If you zoom on any bigger than screen resolution, you will see the type of artifacts shown in your picture.
The most common scenario where text would be rendered as image is when they are overlapping with another image. So try to avoid that. If that's not your case, you will want to try to comment other elements in your page until you can find out what triggering the text being rendered as image.
If the text is actually already rendered as image by something else, for example, a chart component, then the change will have to be made on that end. For example, if your chart supports generating images at a higher resolution than screen resolution, then that will imrove the quality of the text. Or if you can switch to a vector chart component, such as SVG based, then we will still render them as vector text and you can zoom in infinitely (regular text are rendered as vector text that's why you can zoom in infinitely without losing quality).
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/16/2012 Posts: 3
|
Thanks for the quick and informative response!
We are only using CSS here, so red background that spans over a certain percentage with a value on top of it, no image at all. What I don't understand is why the first bar the value is rendered as image but not the 5th bar. Any clues?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I think they are both images, even though I can't explain why the text in the first bar is significantly worse than the last one. If you compare the "0%" on the left side and the "0%" in your bar, you will see the difference right away. Vector text is ALWAYS perfectly smooth no matter how much you zoom one. While text rendered as image look worse the more you zoom in.
You may want to try to play with your CSS a bit here. For example, try to use solid background color, no alpha mixing, no border and see if that works. We have a built-in browser engine embedded in our DLL that does all the rendering but it's a rather complicated piece of software so it is not likely that we will tweak it for individual scenarios.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/16/2012 Posts: 3
|
We have found the problem. It was a CSS3 text-shadow property that was causing all this trouble. Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Ah. That makes sense. Thank you very much for sharing!
|
|