Forum moved here!

Home / Feature request: Lineweight control in lineart/vector pdf

koottova

I have a small FEATURE REQUEST, hoping that it is A) possible to implement and B) won’t make Sumatra any less light and smooth than it is now.

In Adobe Acrobat one can hit Ctrl+5 to toggle lineweights in a vector (lineart) pdf. To the best of my knowledge this is not currently doable in Sumatra PDF viewer. I’m sure many will benefit from implementing this feature. Looking forward …

GitHubRulesOK

This has been requested various ways however the answer is generally the same
“Its down to the author to consider their readers needs and stick to the standards”
the line thickness is usually set to 0 width
Oddly enough I just had to correct big plots where I accidently forgot to move the decimal point so lines were ten times too thick. MyBad

There are several requests in the bug tracker and here in the forum
see Thickness of CAD lines
Line color display too light compare to other pdf reader
Almost invisible lines
[Feature request] Minimum line width

koottova

I’m note sure I’m following you. Line thickness being usually set to 0?? If 0 is off and 1 is on then what you’re saying is that Sumatra keeps lineweights turned off by default … quite not true. If we stick to the logics I mentioned Sumatra seems to default (and allow only) lineweight of 1 (i.e. ON). So there’s that.

About the ‘duh!’ - that’s usually used when u speak to someone and indicate they are a retard or sth like that … maybe your English is poor but if that’s what you actually implied then I can’t help but ask you to stay out of this conversation as given the situation you’re in no position to make such comments.

And in case you didn’t understand my OP - then open a lineart pdf in Acrobat (or maybe even Reader), zoom in a lot, and hit ctrl+5 … lineweights go on and off … 0 and 1.

GitHubRulesOK

I have removed the Homer Simpson reference to self made mistakes.

I am just as guilty as others of setting line thickness incorrectly, especially when under pressure to complete a set of plot corrections for yesterdays deadline.

0 is not off it is zero thickness, and Acrobat draws them 1 pixel wide from the Adobe help site “When Line Weights view is off, it applies a constant stroke width (1 pixel) to lines, regardless of zoom”
To see examples of why why having them “FORCED” to thicker is a problem see https://forum.solidworks.com/message/151691#151691

As you rightly point out lines are also shown by MuPDF which is the engine inside SumatraPDF but it uses a slightly different technique with similar results that are not user adjustable.

I was not born in England and have been learning there for more than six decades, so if I’m poor its not from lack of practice.

koottova

Think my point on your comment ‘Duh!’ was pretty spot on, so no need to drag this on to Simpsons and so on. I asked a question and hoped for an answer. That’s what support forums are for. If you are from the dev team behind Sumatra or anyone from them is reading this - it would be lovely to have the possibility to toggle lineweights - just as I suggested in the OP. If that is not possible or the author/owner of this software does not want this to be implemented then fair nuff. I can imagine myself and many many others needing this feature. So all I could do is do my best to express the need.

GitHubRulesOK

I am but a lowly moderator, devoting the end of my life support
The dev team consists of one family man, who is not paid for his time on providing this software.

SumatraPDF is built on a core renderer provided by Artifex (Sellers of Ghost Script technology) they are not using Adobe code so viewing methods can often be different.

It is possible to change line weights with GS via commands and in those links you may see where I corrected one users file using a community tool from coherent.

Acrobat has Enhance Thin Lines: When selected, clarifies thin lines in the display to make them more visible. What this means (as you can see from many user links here ) is there is an UNDESIRABLE effect of thickening lines thus the results are inaccurate. In fact many PDF authors mistakenly or as a result of bowing to the majority complaints, over compensate for adobe viewing and thin the lines down incorrectly to zero.

If anyone wishes to correct any pdfs that have the wrong line settings then you can download the community version here https://community.coherentpdf.com/ in the manual see 15.3 Hairline Removal where it explains that a value of 0 = ”The thinnest possible line on the output device”.

SumatraPeter

There is at present just the one (original) dev and so the project is not seeing a whole lot of activity. However if you wish to you may review the numerous issues on GitHub related to how Sumatra (MuPDF) deals with line weights and if need be create your own. Hopefully your feature request will be implemented one day…

There may be more of course but here are the relevant issues I found after a quick search:






koottova

You seem to have grossly misunderstood what I initially asked for. Look here

a pdf where lineweight is off and one where it is on. This is only a temporary override. It is only for viewing purposes. The pdf has lineweights assigned upon creation from the authoring tool, e.g. CAD software. ‘‘Correct any pdfs that have the wrong lineweights’’ (which is what you say) has nothing to do with what I am asking for.

Again - I gave the example with Acrobat or Reader where one opens a CAD-created pdf, zooms in and hits Ctrl+5 in order to toggle between lineweight thick and thin. This is only for viewing purposes, it is a temp override. Once you close the pdf the lineweights are ofcourse as they always were … as they came from the authoring software which produced the pdf.

koottova

I was suspecting that it is only 1 dev behind all this so all I can say is that if the feature I am requesting is not going to be implemented or cannot at this stage be implemented then fair enough. I just wanted to inquire. I am still greatly thankful for the OUT-OF-THIS-WORLD lightness of SumatraPDF. Great software.

Thanks to others who tried to help. :slight_smile:

gnuarm

I see there are multiple threads on this issue and no solution.

The problem with the idea off fixing line width issues in the source files is that there are just too many sources of this problem. Partly this is because presently (maybe this has changed over the years) this problem is not universal to PDF viewers, or at least much worse in Sumatra. I have Foxit Reader and whatever is used in the Firefox browser. Both of these tools do not render a line as a single pixel width and allow such drawings to be viewed.

Since other tools don’t have this problem, it doesn’t matter who is “right” about the “proper” way to fix the issue. Creators of data sheets with zero width drawing lines will continue to create such drawings and I will continue to not be able to view them in Sumatra.

I’ve tried pushing back to the companies providing such data sheets to no avail. Heck, I can’t even get them to provide data sheets that are not locked to copying text! (another problem we don’t get any help from Sumatra about). It was just the other day I realized the browser PDF viewer didn’t have this problem and when I checked I found Foxit didn’t either.

Even if Adobe does have the same problem as Sumatra, that’s not much of an excuse to make a tool less useful than it could/should be. Sumatra is a good tool. There’s no reason to not make it GREAT!

GitHubRulesOK

@gnuarm
I do understand that push back to authors is like banging your head on brick walls.
Working daily with others ideas on what a minimum thickness should be, is a constant battle of re-education, and as such my ideas are 1 versus 7 billions of others and hopefully those are not reducing in vast numbers.

PDF files under my peers control I can reprint, those I can;t, I re-edit or adapt.

Also it is sometimes nice to thin down those lines that are too thick. However those all require modifications to the source data. SumatraPDF simplistically tries to match the authors setting. There have been changes to honour that better and in 3.2+ thin lines sometimes appears darker than in 3.1.2.
In comparison across the board SumatraPDF was closest to Acrobat without corrupting thickness up or down.

Here you can see that this issue has been addressed in the current pre-release which shows thin lines darker than previously in version 3.1.2

Your observation that data sheets are often locked against printing thus more difficult to reprint with the lines “thicker” as I often suggest as a workaround on occasion. is less of a restriction in current pre-releases.

gnuarm

I can not understand the idea that a document author’s intention (which is not at all clear from looking at the document) should be respected more so than the user’s wishes which the user is perfectly capable of expressing when using the tool through option settings.

The purpose of a PDF viewer is to VIEW PDF files, not to render them pedantically consistent with another poor tool like Acrobat. Sumatra is failing in this regard for documents generated from many CAD system outputs. Even using 3.2 I have a hard time seeing the lines from many CAD packages.

You might ask, how is this possible? Do the authors never look at their PDF products? Obviously they use a PDF viewer that renders the outputs in a readable format, such as Foxit Reader.

I don’t care about a PDF viewer tool being “faithful” to Acrobat. I have zero interest in editing the PDF files to make them more viewable even if I had that ability. I just want to use tools that actually work.

BTW, I never said anything about printing files. I was talking about the absurdity of a company releasing a data sheet but protecting against copying text from that document. The entire purpose of a data sheet is to provide data.

Here is a data sheet in Foxit.

Here is the same file viewed in Sumatra.

The difference is night and day. If you wish to discuss the author’s intent, do you really think they wanted their document to be displayed in “stealth” mode???

If nothing else, why not give the viewer control over this? Provide some sort of configuration setting that allows a user to actually use the tool rather than having to switch to another tool?