All posts by Nand

nanDECK Version 1.27.2

Hello everybody, there is a new version of nanDECK, with bugs fixed and new features:

New POLY directive

With this directive you can draw an irregular poygon, adding one point with each line, then close it by specifying the last point and the color. Syntax:

POLY="range", pos x1, pos y1, html color | html gradient, html color | EMPTY, thickness



New BOOKMARK directive

This directive adds the referred bookmark (from 0 to 9) to the current line in the editor (or another, if the offset parameter is specified, positive toward the end, negative toward the start). Note that you can go to a bookmark line with CTRL+(0..9).


BOOKMARK=number, offset


number: the number of the bookmark, from 0 to 9

offset: this value is added to the current line in the editor

These bookmarks are automatically added in the validation step at the 1st istance of each directive:


New LOOKUP function

This function creates a label/sequence with the position of a label/sequence in a sequence, the syntax is:

[name] = LOOKUP(value, list)

For example:

[sequence] = LOOKUP(alpha|gamma|delta, alpha|beta|gamma|delta)


[sequence] = 1|3|4

New COLRGB function

This function creates a label containing a color, providing values from 0 to 255 for the three components, this is the syntax:

[name] = COLRGB(red, green, blue)

New RANGEINT function

This function returns the intersection between two or more ranges. Example:


[int3] is equal to “4,6,8,12”.

Undo/Redo in Visual Editor

In the visual editor you can undo/redo changes with CTRL+Z, CTRL+SHIFT+Z (or the two buttons in the top-left of the window).

Added star shaped gradients

An angle between 401 and 500 in a gradient draws a star gradient with 1-100 points. Example:


Added parameters in GRADIENTS for star shaped gradients

You can specify in a GRADIENTS line the parameters for compression, rotation, point factor, twist and scatter for star gradients. Example:


Note: the parametes for rotation and scatter in GRADIENTS are also used in conic gradients.

Added parameter in HTMLTEXT to specify the paragraph separator

The 12th parameters in HTMLTEXT contains the font applied to each paragraph, by default the paragraphs are divided by <br>, with the new 13th parameter you can specify what is used as separator between paragraphs.

Added parameters in HTMLMARGIN for vertical stretch and rotation

The 11th and 12th parameters in HTMLMARGINS allow text to be stretched vertically and rotated in HTMLTEXT. The syntax is:

HTMLMARGINS=htmlfont, margin top, margin left, margin right, margin bottom, paragraph alignment, line spacing, cell width, cell height, stretch h, stretch v, angle

Added parameters in ORIGIN to modify cm for % values

The 6th and 7th parameters in ORIGIN specify the measures corresponding to 100% (horizontally and vertically) in the following lines.

Added parameter in STAR for inner skewing

The 12th parameter in STAR rotate the inner part of the shape. Example:


Added parameter in VORONOI to specify separation between zones

The 8th parameter in VORONOI specifies the width of an empty space between the shapes. Example:

<voro1> = 2, 2, 0, 0, #FF0000
<voro2> = 4, 2, 0, 0, #00FF00
<voro3> = 2, 7, 0, 0, #0000FF
<voro4> = 4, 7, 0, 0, #00FFFF
<voro5> = 3, 4.5, 0, 0, #FFFF00
<bord1> = 2, 2, 0, 0, #800000
<bord2> = 4, 2, 0, 0, #008000
<bord3> = 2, 7, 0, 0, #000080
<bord4> = 4, 7, 0, 0, #008080
<bord5> = 3, 4.5, 0, 0, #808000
VORONOI = 1, 0.5, 0.5, 5, 8, voro*, E, 0.5

Added I flag in COLORCHANGE to invert colors

The I flag inverts the colors in the area specified in COLORCHANGE.

Added A flag in COLORCHANGE to specify more than one change

The A flag in COLORCHANGE means that instead of a single couple, a sequence of colors are changed in the correspondent colors in another sequence.

Added & parameter in alpha gradients to specify compression

In an gradients used in alpha parameter you can specify the compression factor with a & symbol and a number.

Added X flag in HTMLIMAGE to not smooth the image

As a default, images shown in HTMLTEXT using an HTMLIMAGE are smooth, but if you add the X flag in HTMLIMAGE, the smooth is removed (i.e. the image is pixelated).

Added D flag in HTMLKEY to delete a key

The D flag in HTMLKEY deletes a key already defined (i.e. the text is shown as not replaced).

Added E flag in FRAMEPER to select outer frames

Instead of adding all the frames, the FRAMEPER function with the E flag creates only the outer frames (that is, the frames in the perimeter).

Added K flag in SAVE to saved shrinked areas

With this flag, the saved images are reduced by eliminating the area with the color located in the upper left pixel of the area indicated as a parameter.

Added flag in INFO for deck size and date/time

You can use these flags in the INFO function:

N the number of cards in the deck
Y year (date)
M month (date)
A day (date)
O hour (time)
I minute (time)
E second (time)
X epoch

nanDECK Version 1.27.1

Hello everybody, I’ve released a new version of nanDECK, with bugs fixed and new features:

New MANDALA directive

This directive draws a random image. Syntax:

MANDALA = "range", pos x, pos y, width, height, glyphs, angles, segments, min width, max width, min length, max length, html color, red, green, blue

– glyphs is the number of images created and superimposed
– angles is the max number of radial symmetries
– segments is the number of connected segments
– min width, max width is the width of segments
– min length, max length is the length of segments
– color is one or more color used in the process (random if not specified)
– red, green, blue are the variances of each component


mandala = 1, 0, 0, 100%, 100%


New TRANSFORM directive

This directive applies a projection to images loaded with IMAGE of in a layer structure. Syntax:

TRANSFORM = "range", x1, y1, x2, y2, x3, y3, x4, y4

The four couples of % are the coordinates of the projection quadrilateral (use only the range paramter to reset the projection). Example:

image=1,puerto rico.jpg,0,0,100%,100%,90
image=1,puerto rico.jpg,0,0,100%,100%
image=1,puerto rico.jpg,0,0,100%,100%,90


From gallery of n_and

New LINKCACHE directive



With the ON parameter, a linked Google Sheet is saved locally to speed up subsequent executions.

New LINKADO directive



With the ON parameter, instead of the internal library, the ADO libraries are used to load a spreadsheet.

New RANGEINS function


[range] = RANGEINS("range", position, "range", times)

This function takes a range (1st parameter) and add every Nth position (2nd parameter) another range (3rd parameter), optionally the 4th parameter specifies how many times.

Added X/Y flags it VISUAL to set global snap and size to grid

These flags set the snap and position flag on for all the objects in the visual editor (indipendently to the snap and position settings of individual objects).

Added parameters in HTMLIMAGE for margins

Now you can specify a border around an image in HTMLIMAGE, to be used in HTMLTEXT. Syntax:

HTMLIMAGE = "range", key, "image file", width, height, flags, angle, margin top, margin left, margin right, margin bottom

Added R flag in HTMLKEY to use regular expressions

Useful for replacing or adding a format to similar words, example:

htmltext=1,"Summon, Summoner, Summoned, and Desummoned.",0,0,100%,100%,#FFFFFF,0,BE,100,default

Added Z flag in HTMLKEY to write all in a single line

Useful to be sure that multiple words (or images and words) stay on the same line in HTMLTEXT.

Added T flag in BRUSH to set a color as transparent in a custom brush

Useful when you want to fill a shape with a pattern with holes.

Added B flag in COLORCHANGE to blur images and a parameter to make changes only in certain areas


COLORCHANGE="range", pos x, pos y, width, height, html color, html color | html gradient, level, flag, "mask file", schema

The B flag blurs the image in the specified area (there is no need to specify color parameters); the level parameter specifies the number of blur passages (1 if not present), the 11th is used as a 5×5 matrix of blur weight for each pixel.

The 10th parameter can be used as a png mask to specify the area to blur or the area where to apply the color change; for this is used the transparency level of this png file.

Added N/S flags in LINKCOLOR to read font name and size

As with colors in a cell, you can use the flag N to create a sequence with the name of the fonts in a spreadsheet column; and the flag S to create a sequence with the font sizes.

Added a syntax in DISPLAY parameter to specify the number of rows

In the width parameter of the rectangle you can also specify a height with the syntax widthxheight, in this case multiple files can be created (replacing a § symbol with a counter).

Added multiple ranges in DUPLEX/FOLD directives


DUPLEX = 1-3|4-6, 7|8

This means that cards 1-3 are printed with 7th as back, and cards 4-6 with 8th as back.

Added NULL parameter to CHROMAKEY to disable transparency

The NULL value can be used in CHROMAKEY when you want that a layer can be applied whole, instead of treating one of its color as transparent.

Added parameter in FRAMEMAZE function for non-rectangular mazes


[label]=FRAMEMAZE(frames, width, height, start x, start y, flags SME, frames)

The 7th parameter can be used to specify the frames used to draw the maze in a non-rectangular shape.




nanDECK Version 1.27

Hello everybody, I’ve released a new version of nanDECK, with bugs fixed and new features:

New RANGE directive


RANGE = offset

The parameter specifies a number of cards that is added to all subsequent ranges. This directive is useful to merge two scripts that draws cards in the same range, without having to rewrite all the ranges of the 2nd script.

New GRADIENTS directive

This directive can be used to specify additional parameters used in drawing gradients, or to add other gradients color; it works on every directive that uses gradients, and you can use more than one GRADIENTS directive.


GRADIENTS = "range", compression, rotation, flags, pos x, pos y, html color


“range”: a set of cards

compression: a factor used to draw gradient bands narrowly (greater than 1) or broadly (less than 1)

rotation: each axis is rotated of this angle (in degrees)

flags: you can use the following flags:

N – each pixel is drawn in the color of the closest axis between the two that define the sector in which it resides
F – each pixel is drawn in the color of the farthest axis between the two that define the sector in which it resides
M – each pixel is drawn in the average color of the two axis that defines the sector in which it resides
A – each pixel is drawn in the average color of all axis
P – each pixel is drawn in the average color of all axis, proportionally to the distance from the point specified with 5th and 6th parameters
D – delete all current gradients

pos x: horizontal position (in cm) of point used with P flag

pos y: vertical position (in cm) of point used with P flag

html color: in the same format used for HTML, you can also specify a gradient




From gallery of n_and

Added multiple angles for a gradient

You can specify more than one angle for a gradient. Example:



From gallery of n_and

Added conic gradients

Using the 364 angle you can draw conic gradients. Example:



From gallery of n_and

New LINKAUTO directive



If you add a LINKAUTO = ON before a LINK directive, when you save the linked spreadsheet the deck is automatically validated and build.

New LINKTAB directive

In this version every tabulation present in a spreadsheet is removed. If you instead want that to be converted to something else, use a LINKTAB=string line.

New MEASURE function

This function measures the distance from a point until the color changes, in a specific direction, the syntax is:

MEASURE(x, y, direction)

The direction can be one between:


Added parameter in HTMLMARGINS for font stretching

The 10th parameter can be used to change the horizontal size of the text, less than 100 shrinks the font, more than 100 stretches the font.

Added parameter in IMAGEFILTER for blending options

The 2nd parameter specifies a different algorithm used to draw all the images, can be chosen between these options (the standard is SOLID):


Added S flag in SAVE for shrinking the image

If you specify an S flag in the 13th parameter in SAVE directive, the images saved is reduced in the four edges until a different color is found (taking as reference color the one of the top-left pixel). In the 14th parameter you can specify a level of likeness for that color (zero is the same color).

Added I/E flags in LOADPDF for internal/external engine

If you specify an E flag in the 10th parameter in LOADPDF directive, instead of the internal engine you can use Ghostscript to transform a PDF into an image (the path to the Ghostscript executable must be set with the “Config” button).

Added C flag in SAVEPDF for convert PDF in CMYK using Ghostscript

If you add a C flag in SAVEPDF and you have set a path for Ghostscript executable in Setup, the resulting PDF is converted to CMYK color space, optionally using the ICC color profile specified as a file in the 3rd parameter

Added S/V flags in COLORCHANGE for variations in resulting color

With S (the default behavior) the replaced color is the one specified in the parameter, with V the replaced color changes depending from the original color.

Added parameter in RENDER for using a range of cards

The 4th parameter in RANGE directive can be used to create cards only within a range (with the usual range syntax), instead that only from a card (1st parameter) to another (2nd parameter).

Added parameter in POLYGON for zoom

The 13th parameter in the POLYGON directive sets the zoom for it (100 = standard size).

Added MULTI keyword in SEQUENCE..ENDSEQUENCE structure

If you add a MULTI=N line in a SEQUENCE..ENDSEQUENCE structure, subsequent lines are replicated N times, example:


The result is the sequence one|two|two|three.

Added parameter in LINKFILL for setting a number of columns

For correct LINKFILL operation, the number of starting columns can be indicated as the second parameter (in case of empty cells at the end of the row, the program is not able to understand exactly how many columns the row is made up of).

Added ranges of results in combinatoric engine

After the number of elements you can specify one or more filters, to keep only a subset of the results, with this syntax:

C[name]number;char1:min1-max1;char2:min2-max2... = ...

In the resulting sequence are added only the results that have char1 in a number of occurrences between min1 and max1, char 2 between min2 and max2, and so on.

Added Library button in the main window

This button shows a list of example scripts that can be selected and shown in the main edit window. The “Update” button can be used to download a new copy of these scripts (I want to add other script in the future).

nanDECK Version 1.26.3

Hello everybody, there is a new version of nanDECK, with some bugs fixed and new features:

New REPEAT function

This functions is used to build strings with repetitions of characters, the syntax is:

[label]=REPEAT("string", number)

Added parameters in LINE/LINERECT/BEZIER/BEZIERS for arrow angle

The standard arrow has the tip drawn with two lines at 45°, with these parameters you can change this angle:

LINE="range", pos x1, pos y1, pos x2, pos y2, html color | html gradient, thickness, pattern O/D/S, end arrow, start arrow, end angle, start angle

LINERECT="range", pos x, pos y, width, height, html color | html gradient, thickness, pattern O/D/S, end arrow, start arrow, flag TRBLDG, end angle, start angle

BEZIER="range", pos x1, pos y1, handle x1, handle y1, handle x2, handle y2, pos x2, pos y2, html color | html gradient, thickness, end arrow, start arrow, end angle, start angle

BEZIERS="range", pos x, pos y, handle x, handle y, html color | html gradient, thickness, end arrow, start arrow, end angle, start angle

And a negative angle draws the arrows with three lines.



Added parameter in HTMLBORDER for inner background transparency
Added parameters in HTMLBORDER for min/max height

These parameters let you draw the inner area of an HTMLTEXT using a HTMLBORDER line with a partial transparency and a min/max height. Syntax:

HTMLBORDER=htmlfont, type RECTANGLE / DOTTED / DASHED / DOUBLE / GROOVE / RIDGE / INSET / OUTSET / NONE, html color, thickness, gap top, gap left, gap right, gap bottom, corner rounding, html color, alpha, min. height, max. height

Added parameter in HTMLFONT for rotation of characters


HTMLFONT=tag, "font name", font size, style B/I/U/S/O/N/R/C/T/A/M/D/L/G/E/J/H/Y/Z/K/W/V/F, html color, alignment, shadow x, shadow y, shadow blur, shadow color, outline color, outline width, indent, highlight color, char. spacing, angle



Added parameter in HTMLIMAGE for rotation of image


HTMLIMAGE="range", key, "image file", width, height, flag PTMBLREICDH, angle



Added parameter in HTMLTEXT for specifying a font used for paragraphs
Added U flag in HTMLTEXT for using font on multiple paragraphs

The 12th parameter specifies to use a font tag in each paragraph of the text. Note also that with the U flag a sequence in this parameter is applied sequentially in each paragraph.

Added parameter in EDGE for INSIDE borders
Added parameter in EDGE to change tips
Added parameter in EDGE to change corners



Some examples in this thread:

New parameters for EDGE

Added W/H flags in ICONS to distribute icons

Instead of grouping them, these flags distribute the icons horizontally (W) and/or vertically (H) in ICONS directive.

Added J flag in IMAGE for using alternate jpeg library
Added A flag in SAVE for using alternate jpeg library

I’ve added an alternative engine for jpeg images, that can be used in IMAGE (for showing a jpeg) and in SAVE (for saving a jpeg).

Added C flag in LAYER for using layers with the canvas

The C flag specifies that the LAYER is used with the canvas instead of in a card.

Added M/S flags in REPLACE for multiple/single replacements

The default behavior (now selected with the M flag) is to pair every from/to texts to every element of the 1st parameter, instead with the S flag the Nth pair of from/to texts are applied only to the Nth element of the 1st parameter.

Added F flag in COPYCARD for rotate cards upside down

The default with COPYCARD directive is to copy the card as-is. With the F flag the card is rotated upside-down.

Added W/H/D/U flags in INFO function


W - card width (in current units)
H - card height (in current units)
D - card dpi
U - name of the current units (cm/mm/inch)

nanDECK guild on BGG:

nanDeck Users

nanDECK Version 1.26.2

Hello everybody, I’ve released a new version of nanDECK, with bugs fixed and these new features:

New HTMLBORDER directive

This directive adds a border to a font tag (defined by an HTMLFONT), usable with HTMLTEXT. The syntax is:

HTMLBORDER = htmlfont, type, html color, thickness, gap top, gap left, gap right, gap bottom, corner rounding, html color background


[text]="The brown fox (fox) jumps over the lazy dog (dog)."


New FLAGS directive

This directive sets the flags for all the directives in the script. So, for example, if you want to add BE flags in every HTMLTEXT lines, you can use a single FLAGS instead of changing every lines.

The syntax is:

FLAGS = range, directive, flags

If you want to remove a flag instead of adding, use the “-” symbol before it.



htmltext=1-3,"This is a test.",0,0,100%,100%,#FFFFFF,0,,100,default

The result is a plain text in the 1st card, bold and italic in the 2nd, and bold and underlined in the 3rd.

New LINKFILL directive

This directive is used when you have a schema on several rows in a spreadsheet and you want to straighten it in a single row (using the first line to specify the total number of columns that will be filled with the cells); this directive must be used before the LINK command.


LINKFILL = switch


switch: values accepted are:

ON to enable the redistribution of the cells
OFF to disable the redistribution of the cells (the default)

New EXPRESSION directive

This directive specifies the characters used to define expressions to be evaluated in texts in HTMLTEXT and RTFTEXT directives.


EXPRESSION = exp. HTML start, exp. HTML end, exp. RTF start, exp. RTF end


exp. HTML start: character(s) used to define start of expressions in HTMLTEXT directive,

exp. HTML end: character(s) used to define end of expressions in HTMLTEXT directive,

exp. RTF start: character(s) used to define start of expressions in RTFTEXT directive,

exp. RTF end: character(s) used to define end of expressions in RTFTEXT directive,

New CALC function

This function is used to get a result from a specific trigonometric function. The syntax is:

[label] = CALC(flag, value1, value2)

You can choose one of these flags:

C cosine function of value1
S sine function of value1
T tangent function of value1
P pi function (the other parameters are not used)
M the higher between value1 and value2
N the lower between value1 and value2

New FRAMEMAZE function

This function reads a list of edge frames, as 1st parameter (created with a FRAMEPER function), and creates another list of edge frames, arranged as a maze. The 2nd and 3rd parameters are the width and height of the rectangle defined by the edge frames. You can specify the coordinates of the starting cell (as 4th and 5th parameter), otherwise it is randomly selected (this also when set to zero); the ending cell is selected as the farthest from the starting one. The syntax is:

[newframe] = FRAMEMAZE(frames, width, height, X start cell, Y start cell, flags)

You can use these flags in the 6th parameter:

S is created a group of frames for the solution
M is created a group of frames with the sequence used in the creation of the maze
E the exit is along the edge of the maze

At the end of the process other two frames are created, one for the starting cell (with postfix start) and one for the ending cell (with postfix end); if the S flag is used is created also a group of frames for the solution (with postfix solution), i.e. the path from the starting to the ending cell; if the E flag is specified is created also two frames for the edge of the starting cell (with postfix startedge) and for the ending cell (with postfix endedge); if the M flag is specified is created also a group of frames with the sequence used for creating the maze (with postfix map).

This example creates two cards, one with the maze, starting and ending cells, and one that adds the solution:

[x] = 20
[y] = 20
CARDSIZE = [x], [y]
[cell] = FRAMEBOX(0, 0, [x], [y], 1, 1)
[edge] = FRAMEPER(cell, 0.1)
[maze] = FRAMEMAZE(edge, [x], [y], 0, 0, S)
RECTANGLE = 2, <mazesolution>, #FFFF00
ELLIPSE = 1-2, <mazestart>, #FF0000
ELLIPSE = 1-2, <mazeend>, #00FF00
RECTANGLE = 1-2, <maze>, #0000FF
FONT = Arial, 10, T, #000000
TEXT = 2, {°}, <mazesolution>

Added parameter in COOICON for the icon index

If the result of the COOICON function corresponds to multiple icons, you can use the 5th parameter to select one of these.

Added parameters in ORIGIN for the % of the cards

The 4th parameter in ORIGIN sets the value in % for the width of the card (the default is 100), similarly, the 5th parameter is for the height.

Added parameter in SAVE for depth of saved files

The 12th parameter in SAVE sets the depth of the saved image, and can be set equal to:

24 16 millions of colors (the default)
16 65536 colors
8 256 colors
4 16 colors

Added parameter in FONT, FONTRANGE, and TEXTFONT for the spacing of circular text

The default behavior for the circular text is to justified. With this parameter you can specify the actual spacing between characters (zero, or a positive/negative value in cm or the current unit); note that with this parameter is used the horizontal alignment (left/center/right). This parameter is present in FONT (10th), FONTRANGE (11th), or TEXTFONT (19th).

Added J/G flags in HTMLTEXT for enlarging/evening lines of text

The F flag is currently use to shrink a font if text is not contained in the HTMLTEXT rectangle; similarly, a J flag enlarge a font until the text is not contained in the HTMLTEXT rectangle. The G flag reduces the width of the text to obtains lines of the same width.

Added W/V/F flags in HTMLFONT for upper/lower/firstcase of text

W the text is converted to upper case
V the text is converted to lower case
F the first letter of the text is converted to upper case, the others to lower

Added H/V flags in CANVAS for centering the canvas in the cards

The default for the cutting of the canvas images in single cards is to align to the top-left corner, with these flags the images are centered.

And some features in the editor:
F11 on a font name shows you the next one (CTRL+F11 for the previous one),
F12 opens the reference (and download it if the file is not present).

nanDECK guild on BGG:

nanDeck Users

nanDECK Version 1.26.1

Hello everybody, there is a new version of nanDECK, with bugs fixed and these new features:

New PAGESHAPE directive

This directive draws lines, rectangles and ellipses directly in a page (therefore there isn’t a range parameter, and a 100% here refers to the whole page, not to the card). The syntax is:

PAGESHAPE = x, y, width, height, flags, color

You can add several flags (each one is a format or a shape):

A) draw a rectangle
I) draw an ellipse

S) set solid background
M) set empty background

0) set solid edge
1) set dotted edge
2) set dashed edge
3) set dash+dot pattern for edge
4) set dash+dot+dot pattern for edge

T) draw a line in the top side of the rectangle
R) draw a line in the right side of the rectangle
B) draw a line in the bottom side of the rectangle
L) draw a line in the left side of the rectangle
H) draw an horizontal line in the middle of the rectangle
V) draw an vertical line in the middle of the rectangle
D) draw a diagonal line in the rectangle
G) draw a diagonal line (reversed) in the rectangle

E) do not draw the shape on even pages
O) do not draw the shape on odd pages



There is a rectangle at 1cm from the border, and four red circles. Note that MA means: set empty (M), then draw a rectangle (A), the reverse AM would have drawn a filled rectangle.

New DEPTH directive

With this directive you can specify a lower number of colors for the cards (to save RAM occupation), this is the syntax:

DEPTH = range, depth

Where depth can be:
24 = 16 millions colors (the default)
16 = 65,536 colors
8 = 256 colors
4 = 16 colors

New PDFMERGE function

This function is equivalent to the MERGEPDF directive, it was added for use in a loop. For example, this line splits a pdf in single pages:

[pdf]%,(a),1,PDFPAGES(nandeck-manual.pdf) = PDFMERGE(split(a).pdf,nandeck-manual.pdf,(a))

Added parameters in TEXT for stretching text

The 14th and 15th parameters in TEXT can be used for stretching texts horizontally and vertically. Example:

[text]="The brown fox jumps over the lazy dog."

Added X/Y flags in FONT directory for shrinking/stretching texts

These flags do an automatic shrinking/stretching of text. If you add an X flag to FONT, the text is shrinked if too large to fit the rectangle, and if you add an Y flag to FONT, the text is stretched if too small to fit the rectangle. Example:

text=1,"Test Test Test Test",10%,30%,80%,15%

Added parameter in LOADPDF for angle

The 9th parameter of the LOADPDF directive can be used to specify the angle of the rotation of the page loaded from a PDF.

Added parameter in DICE directive for number of rerolls

The 8th parameter specifies how many times the dice are rerolled if is obtained a result marked with “**” (in the list of possible values).

Added T flag in FRAMEHEX function for removing last hexes

This flag removes the last hex from a shifted column (or row) of hexes. Example:


Added “all” button in the interface

This button open all the scripts in a folder, in multiple tabs.

Added hint lines in the preview area

If you put the cursor in the preview area (right top) or the preview window, you see an hint with the line and directive of the element(s) under the cursor.

Added CTRL+click in the preview area

If CTRL+click on an element in the preview area or the preview window, the cursor in the text editor is moved to the correspondent line.

nanDECK Version 1.26

Hello everybody, a new version of nanDECK is available, with bugs fixed and new features:

New CMYK directive

The CMYK command has this syntax:

CMYK = Range, ON/OFF, ICC profile

The ON flag enable the CMYK color profile when saving .jpg images, and optionally you can specify an .icc / .icm color profile (or another .jpg to read its profile).

New TAGS directive

This directive creates a rule that is evaluated in the Simulator (a new feature, albeit still basic). The rule can contain series of letters of numbers, with this syntax:

  • one or more “$” symbol, then letters to define a tag’s value that is present, using the same letter means that the same element is present with that number of copies,
  • one or more “£” symbol, then numbers to define the difference between the values of tag when multiple copies are present (i.e. in a straight); with the !N>M syntax is defined that a tag with value N is treated also like M (i.e. the ace in a straight can be positioned before the 2 or after the King),
  • one or more “=” symbol, then one or more tags that must be present.

You can specify more than one rule for a single directive, all of which will be evaluated at the same time, by separating each rule (and each tag) with the pipe character “|”.

Example (poker probability):

tags=suite|value,$aaaaa|==1011121301,Royal flush
tags=suite|value,$aaaaa|£1111!1>14,Straight flush
tags=value,$aaaab,Four of a kind
tags=value,$aabbb,Full house
tags=value,$aaabc,Three of a kind
tags=value,$aabbc,Two pairs
tags=value,$aabcd,One pair
tags=value,$abcde,No pair

New RANGELABEL function

This function converts a sequence of numbers into a range:

[label] = RANGELABEL([sequence])

New RANGEMERGE function

This function creates a new range mixing the cards from two or more ranges:

[range] = RANGEMERGE(“range1”, “range2″, …”rangeN”)

Added parameters in DISPLAY directive for transparency


DISPLAY = “image file”, first card, last card, width, “range”, transparent color, “mask file”

The last two parameters can be used to save an image file with a transparency, and are used the same way as the parameters in SAVE directive.

Added parameters in SAVEPAGES directive for CMYK format


SAVEPAGES = “filename”, switch, color profile

Switch and color profile are the same as in CMYK directive.

Added V, S, C, and E flags in BATCH directive

The flag added after the batch specifies when the batch is executed, i.e.:

V the batch is executed at the validation step
S the batch is executed at the start of the build step
C the batch is executed at the end of each built card
E the batch is executed at the end of the build step

Added D flag in HTMLIMAGE to disable size adjustment

Usually the images in the HTMLIMAGE directive are drawn rescaled in HTMLTEXT (if using the F flag), with the D flag that behavior is disabled (and the images are drawn with the size specified).

Added H flag in HTMLIMAGE to disable vertical spacing

If the height of an image in HTMLIMAGE directive is higher than a character in HTMLTEXT, the lines are drawn with more space between each other, instead with the H flag the lines are drawn more closer.

nanDECK version 1.25.3

Hello everybody, there is a new version of nanDECK, with bugs fixed and these new features:

New MERGEPDF directive

This directive merges two or more PDF files, the syntax is:

MERGEPDF = “result file”, “source file”, “page range”, page rotation

The 2nd, 3rd and 4th parameters can be sequences.

New IMAGELIMIT directive

This directive detects the limits of an image over a background color, the syntax is:

IMAGELIMIT = “range”, pos x, pos y, width, height, html color, threshold

The limits are loaded in the variables PL (left), PR (right), PT (top) and PB (bottom).

New LINKFONT directive

This directive adds a couple of HTML tag when a different font is read from a cell in a linked spreadsheet, the syntax is:


New LINKSPLIT directive

This directive is used to read each line from a linked file as two different lines, the syntax is:

LINKSPLIT = every row, odd rows, even rows

The parameters can be sequences.

New FRAMEIMAGE function

This function creates a list of frames from a source list and an image, this is a thread about it:

A new function: FRAMEIMAGE

Added A and R flags in BRUSH directive for bitmap positioning

Added C and I flags in REPLACE function for case replacement

Added multiple body parameters in SCHEMA function

Added a sequence as 3rd parameter in EXPAND function