|
Rank: Newbie Groups: Member
Joined: 7/7/2017 Posts: 4
|
I am currently evaluating this product. However one issue that I am having is that the border width of objects appear to be rendering in the PDF at 1pt when I want them at 0.5pt. (currently in my organization the documents are produced in Word with border widths of 0.5pt and printed to pdf and my task is to produce identical documents from html/css and then use your tool to create the pdfs.) However it doesn't seem to matter what I set the border-width value to in my css I never get a border less that 1pt. How can I remedy this? Thank you.
I should add I have tried using pixels and I have tried setting the point value as low as 0.00001 and always get the same result.
Thank you.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
Hi,
This is a known limitation. Due to the "pixel" root of the browser engine, and also because a browser engine's first priority is always to produce pixel accurate rendering on screen, internally almost everything is rounded to pixels. As such the render engine will not render anything less than 1 pixel, which equals to 0.75pt. In another word, anything less than 0.75pt is rounded up to 0.75pt.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/7/2017 Posts: 4
|
Thank you,
Any suggestions on how to get round this? Currently I have doubled the size of literally everything in my CSS (now setting the border size as 1pt) and then set a ZoomLevel of 0.5. This seems to work but at the same time seems a bit extreme. Any other ideas or is this as good as it is going to get?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
Hi,
Have you tried to increase your system DPI? At the default 96 DPI, 1 pixel = 0.75pt. However if you set your DPI to 144 (150%), then 1 pixel = 0.5pt.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/7/2017 Posts: 4
|
Presumably though that would be useless when a client opens the PDF on their machine as I cannot control their system DPI and have to assume the default?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
No. That is not entirely correct.
The client system's DPI does matter but it's at a different stage. In the conversion stage, the pixel/point round up occurs inside the browser engine, which is when the converter runs. In another word, on a 96 DPI system, the minimum line width the converter can write into a PDF file is 0.75pt. However on a 144 DPI system, the minimum line width the converter can write into a PDF file is 0.5pt. This occurs on your computer/server, not on the client's computer.
Now once the 0.5pt line width is written into the PDF file, whether the PDF Viewer program on the client computer can display it correctly is a similar but unrelated issue. On a standard 96 DPI system, the PDF Viewer application will face exactly the same problem the browser engine faces when it needs to display a 0.5pt line. Some Viewer application choose to round up to pixels (thus rendering them as 0.75 pt), some viewer application chooses to lower the color intensity of the line (for example, a 1pt line is solid black, but a 0.5pt line is gray). The bottom line is, even if the PDF file correctly specify the line width as 0.5pt, if the screen is not capable of displaying it, some kind of rounding or compromise has to be made.
That is not to say it is useless to have 0.5pt in the PDF file. The line width difference will show when you zoom in or print the file. A printer is well capable of printing 0.5pt or even narrower lines.
|
|
Rank: Newbie Groups: Member
Joined: 7/7/2017 Posts: 4
|
OK daft question - how do I change the system dpi? I assume I go in through the display settings. In which case, unfortunately this did not make any difference to the final pdf produced.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
Yes. You would go through display settings. You may not see any significant difference just by looking at the PDF output since the PDF viewer application may still not render the line faithfully. But if you print the output with a printer you should be able to print 0.5pt line if your system DPI is at least 144.
|
|