I am able to sucessfully modify “SetLineWidth” value using the code sample provided in ContentTweakingSample.cs (from the 0.1.0 Alpha build) – it works fine in 0.1.2 release as well for SOME pdf files.
My problem is that I get PDF files from many different sources and created by different drivers or applications – and I cannot find the UNITS of the LineWidth value. The content of these PDF files are complex CAD drawings, not just text. I tried the page dictionary object, “UserUnits” but it is useless, it is not defined for many PDF’s and the adobe spec confirms it is optional as of version 1.6.
The UNITS of setLineWidth.Value is not at 1/72” points for many PDF files
I have prepared a proof of concept to extract all unique linewidths (basically the stroke value) from a PDF and see the following examples
Line Thickness Detected for : test1.pdf
In this case it is 1" in file = 407.5 units in PDF, or 1 unit in Linewidth value equals 1/407.5”
Line Thickness Detected for : test2.pdf
In this case it is 1" in file = 600 units in PDF, or 1 unit in Linewidth value equals 1/600
Line Thickness Detected for : test3.pdf
In this case it is 1" in file = 72 units in PDF (the PDF default units), 1 unit = 1/72”
My question is – I need to set minimum linewidth to a known value – using 1/72” for conversion fails on many PDF files for the above reason.
How Can I detect the user units of the page or the linewidths (stroke) that has been used and set it consistently to a desired minimum ?
Thank you for any help
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.