View Issue Details

IDProjectCategoryView StatusLast Update
0017027ScribusScripterpublic2023-11-04 09:09
Reporterale Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.7.0.svn 
Fixed in Version1.7.0.svn 
Summary0017027: scripter: document that newDocument()'s size must be in the unit specified
Descriptionhttps://gitlab.com/scribus/scribus/-/blame/master/scribus/plugins/scriptplugin/cmddoc.h?ref_type=heads#L22

says

"""
size = A tuple (width, height) describing the size of the document. You can\n\
use predefined constants named PAPER_<paper_type> e.g. PAPER_A4 etc.\n\,
""""

but, at least if you specify the unit as MM (which is probably the most common choice, with the inches), you will need PAPER_A4_MM.

the documentation should specify that...



or -- but it might be too late -- the size should be defined in pt...

... or there should be a function that allows to use PAPER_A4 and pass the pt value to newDocument().

... i've just spent half an hour trying to understand why my guides hat a way too big value...
TagsNo tags attached.
PatchNo

Activities

cbradney

2023-10-23 20:00

administrator   ~0050395

It does say "PAPER_* constants are expressed in points. If your document\n\
is not in points, make sure to account for this."

But I have added some extra text.

ale

2023-10-24 14:23

manager   ~0050397

i rather thought about a notice about it in the new_document command:

use predefined constants named PAPER_<paper_type>_<unit> e.g. PAPER_A4, PAPER_A4_MM etc.\n\

Issue History

Date Modified Username Field Change
2023-10-14 08:46 ale New Issue
2023-10-23 20:00 cbradney Note Added: 0050395
2023-10-23 20:02 cbradney Assigned To => cbradney
2023-10-23 20:02 cbradney Status new => resolved
2023-10-23 20:02 cbradney Resolution open => fixed
2023-10-23 20:02 cbradney Fixed in Version => 1.7.0.svn
2023-10-24 14:23 ale Note Added: 0050397
2023-11-04 09:09 cbradney Status resolved => closed