View Issue Details

IDProjectCategoryView StatusLast Update
0009054ScribusShape Drawingpublic2025-04-05 22:29
ReporterBernhard Reiter Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status acknowledgedResolutionopen 
Product Version1.3.6 
Summary0009054: Feature: Fix Hairline width
DescriptionI think it'd be quite useful to have a centralised feature (eg in the extras menu) to increase the widths of lines below a given threshold to a printable minimum, see eg
http://help.adobe.com/en_US/Acrobat/9.0/Professional/WS58a04a822e3e50102bd615109794195ff-7b88.w.html
TagsNo tags attached.
PatchNo

Relationships

related to 0017399 new Objects in groups are not accessible via the scriptplugin python API 
related to 0017490 new [PATCH] Scripter: GetItem(name) should look inside of groups 

Activities

Kunda

2016-05-09 16:12

updater   ~0040913

Bernhard Reiter, can you update the link?

Kunda

2016-05-10 16:11

updater   ~0040940

Relevant links:
https://answers.acrobatusers.com/AcroJS-script-fix-hairline-width-q192774.aspx
https://forums.adobe.com/thread/1680622?start=0&tstart=0

ale

2025-04-05 22:29

manager   ~0052411

it seems that for adobe users, a script can be part of the solution.

I've created a script that enforces a minimal line width, for all lines that have a color.

import scribus

def get_unit_name(unit):
    if unit == scribus.UNIT_POINTS:
        return "pt"
    elif unit == scribus.UNIT_MILLIMETERS:
        return "mm"
    elif unit == scribus.UNIT_INCHES:
        return "in"
    elif unit == scribus.UNIT_PICAS:
        return "p"
    elif unit == scribus.UNIT_CENTIMETRES:
        return "cm"
    elif unit == scribus.UNIT_CICERO:
        return "c"
    return ""

def set_minimal_line_thickness(item, minimal_thickness):
    try:
        scribus.getLineColor(item)
    except:
        scribus.messageBox('', item)
        return
    if scribus.getLineColor(item) == 'None':
        return
    line_width = scribus.getLineWidth(item)
    if line_width < minimal_thickness:
        scribus.setLineWidth(minimal_thickness, item)

def main():
    if not scribus.haveDoc():
        return
    minimal_thickness = scribus.valueDialog('Line thickness', f'Minimal line thickness ({get_unit_name(scribus.getUnit())}):')
    try:
        minimal_thickness = float(minimal_thickness)
    except ValueError:
        return
    minimal_thickness = scribus.docUnitToPoints(minimal_thickness)
    current_page = scribus.currentPage()
    for page in range(1, scribus.pageCount() + 1):
        scribus.gotoPage(page)
        for item in scribus.getPageItems():
            if item[1] == 12:
                for group_item in scribus.getGroupItems(item[0]):
                    set_minimal_line_thickness(group_item[0], minimal_thickness)
            else:
                set_minimal_line_thickness(item[0], minimal_thickness)

    scribus.gotoPage(current_page)
if __name__ == '__main__':
    main()


You can also find it here: https://github.com/aoloe/scribus-script-repository/tree/master/lines_fix_thickness

for working correctly, it needs the patch in 0017399

Issue History

Date Modified Username Field Change
2010-04-23 22:55 Bernhard Reiter New Issue
2010-04-24 06:28 ale Description Updated
2010-04-24 18:53 christoph_s Status new => acknowledged
2016-05-09 16:12 Kunda Note Added: 0040913
2016-05-10 16:11 Kunda Note Added: 0040940
2016-05-10 16:12 Kunda Patch => No
2016-05-10 16:12 Kunda Summary "Fix Hairlines" feature request => Feature: Fix Hairline width
2025-04-05 14:14 ale Relationship added related to 0017490
2025-04-05 22:22 ale Relationship added related to 0017399
2025-04-05 22:29 ale Note Added: 0052411