πΎ Archived View for dcreager.net βΊ remarkable βΊ sizing-notes.gmi captured on 2024-08-25 at 00:18:10. Gemini links have been rewritten to link to archived content
β¬ οΈ Previous capture (2023-09-08)
-=-=-=-=-=-=-
For recent SIGPLAN papers, a bounding box of β45 60 450 636β is a good starting point.
For slightly less recent SIGPLAN papers, try β53 66 558 721β.
For LNCS papers that are printed on a letter-sized page, try β134 126 484 677β.
For OASIcs papers, try β90 106 92 490 765β.
βββββββββββββββββββββββββββββ β 40 β β ββββββββββββββββββ β β 160 β 1204 β 40 β β β β β β β β β β β β β β β β β β β β β β β 1792 β β 1872 β β β β β β β β β β β β β β β β β β β β β ββββββββββββββββββ β β 40 β βββββββββββββββββββββββββββββ 1404
The pixel dimensions of the Remarkable 2 are 1404 Γ 1872. The width of the left sidebar is 120 pixels. I've chosen to add a 40-pixel margin around the content. That gives us total margins of 160L, 40T, 40R, and 40B. We need to resize the content of the PDF to fit within 1204 Γ 1792.
Aspect ratio of content: 1792 / 1204 = 1.488 Margin multipliers: LM = 160/1204 = 0.133 TM = 40/1792 = 0.022 RM = 40/1204 = 0.033 BM = 40/1792 = 0.022
First, use βpdfcropβ to determine the bounding box of each page:
$ pdfcrop --verbose $ORIGINAL.pdf /tmp/fff.pdf
Manually inspect the output to see which bounding box to use. Normally you'll want to find a page that is representative and use its bounding box. There might be more space cropped from the top of the title page, for instance. Old scanned PDFs might not have the real pages lined up perfectly on each PDF page. Use your judgment to choose a initial guess for the bounding box that will work for all pages.
$ pdfcrop --verbose --box "L B R T" $ORIGINAL.pdf /tmp/fff.pdf $ evince /tmp/fff.pdf &; disown
If your initial guess isn't right, tweak the numbers and rerun the βpdfcropβ command. Your βevinceβ window will automatically reload the PDF as you mess with it. (Note that the PDF bounding box uses the _lower left_ corner of the page as the origin. That won't affect any calculations below, but you need to keep that in mind as you play with the bounding box coordinates.)
Once you're happy with the cropping, it's time to add the margins. As mentioned above, you want 160- and 40-pixel margins β but that should be applied to content that is 1204 Γ 1792. Your cropped PDF content is almost certainly not those dimensions.
First, the cropped PDF is probably not the right aspect ratio (1.488). Figure out what the aspect ratio is:
W = R - L H = T - B AR = H / W
If the aspect ratio is less than 1.488, then you need additional vertical padding:
NW = W NH = W * 1.488 EW = 0 EH = (NH - H) / 2
If it's greater than 1.488, you need additional horizontal padding:
NW = H / 1.488 NH = H EW = (NW - W) / 2 EH = 0
Then you need to multiply the desired margins (160 and 40) by your actual dimensions to get your scaled margins:
SL = (LM * NW) + EW ST = (TM * NH) + EH SR = (RM * NW) + EW SB = (BM * NH) + EH
And then you can run the final βpdfcropβ command:
$ pdfcrop -m "SL ST SR SB" --bbox "L B R T" $ORIGINAL.pdf $REMARKABLE.pdf