Skip to main content
borm ai97978119
Participant
July 19, 2018
Answered

Line width /LW in PDF ignored (not displayed correctly)

  • July 19, 2018
  • 4 replies
  • 2546 views

Hi all,

I have a PDF with several lines and different line widths defined through /LW argument. Somehow the Acrobat Reader shows all the lines with the same line width. Other PDF readers like Foxit or SumatraPDF display the lines correctly.  This is not an issue with CTRL+5 which turns on/off the line width or "enhance thin lines" in Settings.

I attached screenshots of Acrobat Reader and SumatraPDF to see the difference.

Acrobat Reader:

SumatraPDF

The line widths are defined through /LW in PDF as:

6 0 obj

<</CA 1

/ca 1

/LC 1

/LJ 1

/LW .36850393

/ML 0

/SA true

/BM /Normal>>

endobj

Do you have any idea what can be the problem?

Is this a bug in Acrobat Reader or I need to adjust some setting in the app?

Thank you for your help!

    This topic has been closed for replies.
    Correct answer Test Screen Name

    I can confirm I see this effect and the PDF is as you describe.

    I wonder if the ML 0 is causing this, there are strange errors about number out of range from VERY VERY old versions of Acrobat and that's all I can see.

    4 replies

    Legend
    July 20, 2018

    I’ve suggested two things. Does either one work separately or together?

    borm ai97978119
    Participant
    July 23, 2018

    Hi, it seems that removing the /ML solved the issue and the file is displayed and printed correctly by using Acrobat Reader.

    The question remains the same. Is the /ML 0 valid state? If so then this is probably a bug in the Acrobat Reader.

    As I stated before other PDF Viewers display and print the file correctly. We tried Foxit, SumatraPDF, Mozilla Firefox and Microsoft Edge.

    The file was written by using PDF backend of the Google Skia Graphics library.

    Thank you for your response.

    Best Regards,

    Gabriel

    Legend
    July 23, 2018

    It's an interesting question. The default Miter Limit is 10.0 and it is defined as 1 / sin ( angle ) or similar. Since sin can only give values up to 1.0, the smallest possible miter limit is 1.0. 0.0 is not a possible miter limit. Yet, the PDF spec also says that invalid numeric values should be bought into range by a conforming viewer.

    Whatever your intention is by setting a miter limit of 0, you should look at what the correct number is and use that. Even if it is a bug, and even if Adobe fix it, countless millions of people will be using the unfixed software so it's better to fix your generator.

    Test Screen NameCorrect answer
    Legend
    July 19, 2018

    I can confirm I see this effect and the PDF is as you describe.

    I wonder if the ML 0 is causing this, there are strange errors about number out of range from VERY VERY old versions of Acrobat and that's all I can see.

    borm ai97978119
    Participant
    July 20, 2018

    Hi,

    Does it mean, that this is a bug in Acrobat Reader?

    Best Regards,

    Gabriel

    Legend
    July 19, 2018

    By the way... while LW in an extended gstate should be valid, I don't recall ever seeing it used. Have you tried with a "w" operator?

    Legend
    July 19, 2018

    Can you share a file (not in the forum, not as text, but file sharing/URL)?

    borm ai97978119
    Participant
    July 19, 2018

    Hi,

    Here is the link to the file: https://files.bormgruppe.com/?u=LN2u&p=5VM1&path=/ColorTableTest%20A4_Hoch.pdf

    Thank you for your help.

    Best Regards,

    Gabriel