Create Templates
This project already supports many cutting templates but if you’d like to create your own, here’s what you need to do.
Create cutting template
Open Silhouette Studio and create a cutting template.
Use the Transform tools to ensure that the cards are aligned and evenly distributed.
Save the template in cutting_templates/
.
Create square PDF
Modify the cutting template so that the corners of the cards are square.
Fill the cards with black color.
Disable print bleed.
Print the template to PDF.
Update layouts.json
assets/layouts.json
contains the position of each cutting shape.
Import the square PDF into a photo editing software. The photo editing software should convert the PDF into a photo format. The photo must be 300 PPI.
Determine the coordinates of the top left corner and the size of each card.
Create a new entry in layouts.json
.
{
"paper_layouts": {
"letter": {
"width": 3300,
"height": 2550,
"card_layouts": {
+ "domino": {
+ "width": 524,
+ "height": 1049,
+ "x_pos": [
+ 245,
+ 817,
+ 1388,
+ 1959,
+ 2531
+ ],
+ "y_pos": [
+ 205,
+ 1296
+ ],
+ "template": "letter_domino_v1"
+ }
}
}
}
}
Update utilities.py
utilities.py
contains two enums which capture every card and paper size. Update these appropriately.
class CardSize(str, Enum):
STANDARD = "standard"
JAPANESE = "japanese"
POKER = "poker"
POKER_HALF = "poker_half"
BRIDGE = "bridge"
+ DOMINO = "domino"
class PaperSize(str, Enum):
LETTER = "letter"
TABLOID = "tabloid"
A4 = "a4"
A3 = "a3"
ARCHB = "archb"
Update Assets
If you’re adding a new paper size, you also need to add new base images to assets/
.
For example, for letter
paper size, there are the following files:
Run create_pdf.py
Now you’re ready to test out your new card and paper size!
python create_pdf.py --card_size domino
Pull Request
A pull request is how external contributors can suggest changes.
Make a pull request to share your cutting template with the rest of the world!