crobi / rpg-cards

RPG spell/item/monster card generator
https://rpg-cards.vercel.app
MIT License
514 stars 289 forks source link

Layout breaks if printer can't handle zero margins. #110

Open MaelwysSC113 opened 6 years ago

MaelwysSC113 commented 6 years ago

Everything looks fine in the card previewer and the generated page, but whenever you go to print them in your browser they are too wide for the card. Each card will only contain the first 4 stats (STR, DEX, CON, INT) and leave off the last 2 (WIS, CHA).

Editor Preview: image

Generated Cards Tab: image

Print Preview (can confirm they they actually print like this): image

MaelwysSC113 commented 6 years ago

Only workaround I could find is to print to PDF, then open the PDF file and print from there, but then the card backs are out of alignment vertically

crobi commented 6 years ago

I can't reproduce this. What is your page size (e.g., A4 or US Letter) in the generator and in the Print Preview?

MaelwysSC113 commented 6 years ago

US Letter, and I'm using Chrome

Here's the input I was using:

subtitle | Medium beast, unaligned rule property | AC: | 13 (Natural armor) | Speed: | 40 ft property | HP: | 11 (2d8+2) | CR: | 1/4 (50 XP) rule dndstats | 12 | 15 | 12 | 3 | 12 | 6 rule property | Skills: | Perception +3, Stealth +4 property | Senses: | Psv Percptn 13 property | Traits: | Keen Hearing & Smell (ADV on WIS checks for hearing/smell), Pack Tactics (ADV on atk roll if ally w/in 5 ft) fill | 2 section | Actions description | Bite | Melee Atk: +4 to hit, reach 5 ft, one target. Hit: 2d4+2 (pierce). If the target is a creature, it must make a DC 11 STRsave or be knocked prone

crobi commented 6 years ago

Still can't reproduce it. I suspect the reason is that the printer adds margins to the page*, thereby shrinking the content. Can you try changing the page margins in the printer settings?

*The page with the cards is generated such that it exactly fits the paper, and the page margins are set to zero. If the printer refuses to use zero margins, the layout will break.

MaelwysSC113 commented 6 years ago

I may just be being dumb in a way I'm not catching for some reason, but it still happens if I set the margins to "None"

image

crobi commented 6 years ago

I have tried to explain it above - your printer probably requires some minimal margins and silently modifies you margin setting, thereby breaking the layout.

I'm not sure how to solve this. For now, printing to PDF and then playing around with print settings when printing the PDF is probably your best option. Note also that regular printers are usually not very precise, the front and back sides may be shifted by 1-2mm even if you get the settings right.