-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make page layout look better #21
Comments
Can you say a little more about why you'd want this? I want to get a feel for the current problems you're hitting (you're basically the first actual user who's contacted me, so I'd like to learn more). Do you actually want to be able to set margins? Or is zero-margin just too ugly? If a sane default would work I should do that too. For example, maybe equal margins on all sides should be the default, or I maybe the rectangular box is drawing attention to the margins. On my printer, even the zero margin settings result in a lot of margin on actual paper, but that may not be universal. |
Actually, I may not if there's enough margin by default and if QR codes are centered. Let's split the discussion in a few parts: QR Code AlignmentLet's say I must use QR codes version 15 on A4 sheets. With default scale (8), it'll look like this: Page 1 of 2: Page 2 of 2: Having QR codes centered on the page would have some advantages:
The same example with QR codes centered looks like this: Page 1 of 2: Page 2 of 2: It could be argued either the last page should have the QR codes start at the same top-left coordinates than other pages, like the example above, or if codes should also be centered vertically like this: I prefer the first option (starting at the same top-left coordinates) because IMO it looks more consistent and it would allow to fold the sheet the same way as other sheets without folding in the middle of QR codes. InstructionsInstructions on the cover don't have any left margin: IMO it would look better with some margin, something between 1.5 cm (43 points) and 2.5 cm (71 points), or 1 inch (72 points). While I'm at it, I think that it would be even better if instructions would be a little bit bigger (right now, it's so small, it looks like font 7 pt) and if it was added as text instead of as an image, so copy/paste would be possible if we have access directly to the digital file. Page Borders
Yeah, printer models vary a lot about the printing area. Some can do borderless printing. A quick way to test a printer is to open LibreOffice, change the top, right, bottom and left margins to 0 and validate. Usually a popup warning will be displayed if the printer can't handle borderless printing and it'll adjust margins to the minimum supported by the printer driver. For example, the printer I have access to right now can print with 1 mm margin from the top and 3 mm from the left. It also depends on the printer configuration or the software used to print the PDF document. In case the content is outside the printing area (like the instructions that don't have any margin), it may or may not automatically add margin, scale content, center the scaled content, etc. So, IMO it means that if you want to keep page borders in PDF generated by
Page NumbersIt doesn't solve the page number margins. Like instructions, I think some default margin would be better, but it greatly depends on the position of the page numbers. Some printers can't print easily near the bottom, like the printer I have access to right now must have a minimum margin of 14 mm at the bottom while only 1 mm is needed at the top. I see in the code this comment:
Would it be about an option to choose the position of the page numbers (top left, top right, bottom left, bottom right, none, label)? The option "label" may add the page number in the label text. For example, labels are like this by default:
Removing the word "code" would add some space (even when page numbers are not added in labels, it would add more space to the file name) and the page number could be added like this:
If there were such an option ( |
in #51 i suggest shifting to a monospace font. DejaVu Sans Mono is slightly bigger and more readable, IMHO. there's also a discussion specifically about margins in #49 that you might be interested in. i agree the page layout could look nicer. in comparison, paperbackup is gorgeous, but that comes at a hefty dependency cost (they use Python PyX, which uses LaTeX to generate the layout). |
Currently, the argument
--page
allows to set the width and the height (--page 500 600
), but the page margins can't be specified. For example, cover instructions basically don't have any margin:It would be useful to be able to set horizontal and vertical margins like this:
Example:
It would also allow to center the QR codes on the page.
The text was updated successfully, but these errors were encountered: