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.

Liked it? Take a second to support Nand on Patreon!
Become a patron at Patreon!

10 thoughts on “nanDECK Version 1.26.1”

  1. Hello, just familiarizing myself with all the functionality of this great tool. I have run into an issue getting the COUNTER and FOR counters to increment. The program seems to be reading them correctly as it is outputting the initial value, but never seems to increment the value, no matter what I try. I’ve even tried copying and pasting the examples directly from the manual. Any ideas?

      1. Sure thing, thank you.

        I tried lots of examples and finally got the FOR counters to work. It turns out CARDS needed to be specified for the specific thing I was trying, so I won’t post that. Still can’t get the COUNTER to work though:

        FONT=”Arial Narrow”,12,,#000000

        I would expect output on card 1: “1” , card 2: “2”, and card 3: “Hello” based on the Expressions section of the manual (pg 53). I actually end up with “Hello”, “111”, and blank.

        1. The engine works this way: the build step it’s a loop from 1 to the number of cards, for each card every line is evaluated (if it has a range) and executed.

          So for card #1:
          COUNTER=1-3,A,1 -> the counter A is set to 1
          TEXT=1,”{A}”,0,0,6,9 -> it draws 1
          TEXT=2,”{1A1}”,0,0,6,9 -> it does nothing
          TEXT={A},”Hello”,0,0,6,9 -> the counter is 1, so it draws Hello

          Card #2:
          COUNTER=1-3,A,1 -> the counter A is set to 1
          TEXT=1,”{A}”,0,0,6,9 -> it does nothing
          TEXT=2,”{1A1}”,0,0,6,9 -> it draws 111 (more on this later)
          TEXT={A},”Hello”,0,0,6,9 -> the counter is 1, so it does nothing

          Card #3:
          COUNTER=1-3,A,1 -> the counter A is set to 1
          TEXT=1,”{A}”,0,0,6,9 -> it does nothing
          TEXT=2,”{1A1}”,0,0,6,9 -> it does nothing
          TEXT={A},”Hello”,0,0,6,9 -> the counter is 1, so it does nothing

          About the 111, the auto-increment/decrement of counters was a thing I’ve introduced but it created some problems, therefore I’ve disabled it by default. If it is enabled with a check on the option Config -> Enable auto increment/auto decrement of counters, it draws 2 in the 2nd card.

          1. This makes perfect sense. I think I had missed the configuration options before. I’m glad it’s not broken, ha. Thanks for the explanation! Very helpful.

  2. I just noticed a typo: On the bottom of page 39 of the nanDECK Manual for v1.26.1, the example for the “TAGFRAME” function has “STRINGSUB”.

    1. … also, the example at the bottom of the “VECTOR” directive (pages 163, 164) shows “IMAGE”, not “VECTOR”

      All in all, it is an excellent program with outstanding documentation.

  3. Hi,
    I would like to make a suggestion for a future version of nandeck.
    The idea is to save paper when printing cards that cannot optimally fill landscape or portrait.
    In my case, I’m printing 5.5cm by 7.5cm cards. On an A4 page in landscape, that is 5×2 cards (filling 27.5x15cm), leaving enough whitespace at the bottom to still print another 3 cards, if they were rotated.
    Maybe I missed it and it’s already possible to do that, otherwise it would be a cool addition.
    In any case, thanks for the software, it’s really great for working on cards and tokens 🙂

    1. Hi, the problem related to arrange cards with different rotations on a page is that all the routines for duplexing, folding, guidelines and marks are written for cards with the same size and orientation. For drawing images of different size in a page, look at MOSAIC directive.

Leave a Reply

Your email address will not be published. Required fields are marked *