voyent
Very thin lines  XML
Forum Index -> ICEpdf General
Author Message
therealkenc

Joined: 26/Jul/2010 12:17:17
Messages: 3
Offline


Hello. I am finding that very thin lines are drawing "thinner" using ICEPdf than with Adobe Reader. Below are some screencaps to give an idea. I also have a test pattern pdf if there is some place I can put/attach, if that is useful. The lines in question are 3 twips (3/1440th of an inch).

The real problem is that when sent to a printer (a PCL laser printer in my case) the ovals don't render properly -- pixels are missing from the line. Its a bit hard to describe without the paper in your hand. When printing directly from the application (using GDI) it prints okay.

In other words:

app->PCL printer (ok)
app->acrobat 9->reader->PCL printer (ok)
app->acrobat 9->icepdf viewer->PCL printer (missing pixels)

Has anyone seen this before, and is there a way to address?

TIA,
Ken

screen cap from icepdf viewer


screen cap from adobe reader



patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1974
Offline


Can you attach the test file this thread?
[Email]
therealkenc

Joined: 26/Jul/2010 12:17:17
Messages: 3
Offline


Ahh, I missed the attach files button first post. Print with ICDPdf Viewer and Adobe Reader. ~K

patrick.corless wrote:
Can you attach the test file this thread? 
 Filename Test Draw.pdf [Disk] Download
 Description
 Filesize 6 Kbytes
 Downloaded:  204 time(s)

patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1974
Offline


Acrobat and ICEpdf use slightly different default zooms. Or in other word our 100% is slightly smaller then their viewer.

The test file you send over is quite simple containing only a few draw operations. Any differences on screen are likely do subtle differences in how Java2D does anti-aliasing when compared to Acrobats graphics engine.

Printing in Java is a bit of a black box and there is very little that can be configured programmaticly to get around quality issues. However that said you could try tweaking some off the Java2D rendering hints to see if any improvements can be made (http://wiki.icefaces.org/display/PDF/System+Properties). In some extreme cases it maybe necessary to paint to image and then print the image.
[Email]
therealkenc

Joined: 26/Jul/2010 12:17:17
Messages: 3
Offline


I appreciate the reply. I don't believe it is a "zoom" issue per-se. I am talking about printing on an 8.5"/11" piece of paper. When printed the size of the ovals is exactly the same; it is the width of the strokes that differs. I just took some screen caps from the viewers (above) to give a general idea. Observe the ICEpdf stokes are thinner than Reader even though the ovals are larger.

I'll play with the properties; thanks for that pointer. core.target.stroke looks promising. If you have any specific suggestions that might make the strokes thicker, I'd be grateful.

Ken
joaomarcos50763

Joined: 08/Nov/2018 09:36:32
Messages: 4
Offline


I've encountered the same problem. But I found no solution. The lines in IcePdf are thinner than the real.
[Thumb - icepdf.PNG]
 Filename icepdf.PNG [Disk] Download
 Description Preview on icepdf
 Filesize 12 Kbytes
 Downloaded:  36 time(s)

[Thumb - AdobeReader.PNG]
 Filename AdobeReader.PNG [Disk] Download
 Description Preview on AdobeReader and other programs
 Filesize 12 Kbytes
 Downloaded:  28 time(s)

patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1974
Offline


Any chance you could post a sample PDF file?
[Email]
joaomarcos50763

Joined: 08/Nov/2018 09:36:32
Messages: 4
Offline


Sure. The pdf file is below. I've tried several options like the org.icepdf.core.target.stroke property, but I did not succeed.

Please Help me :(
 Filename 0.pdf [Disk] Download
 Description
 Filesize 108 Kbytes
 Downloaded:  19 time(s)

joaomarcos50763

Joined: 08/Nov/2018 09:36:32
Messages: 4
Offline


I need the solution urgently. :(
joaomarcos50763

Joined: 08/Nov/2018 09:36:32
Messages: 4
Offline


Help me please!!!! :(
patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1974
Offline


You'll need to enable the system property -Dorg.icepdf.core.strokeAdjustmentEnabled=true
and set
-Dorg.icepdf.core.strokeAdjustmentThreshold=0.15

This will make the lines all a bit thicker. If you need to adjust the thickness you can use the property -Dorg.icepdf.core.strokeAdjustmentValue which has a default of 0.2.
[Email]
 
Forum Index -> ICEpdf General
Go to:   
Powered by JForum 2.1.7ice © JForum Team