0

I have lecture slides in pdf format that were generated with the default LaTex presentation format. I want to write digital notes on them and for that I would like to have a big lined/ruled space to each slide's right side.

I tried the solution provided in this Super User question and it worked ok: I duplicated the sheet width and added a right margin that would take the space of half of the page. It resulted in something like this: https://i.sstatic.net/MXQof.png

The problem with this solution is that when I'm note taking digitally, I zoom a lot in the page and therefore I loose the reference on how big my handwriting should be. I would like to make the blank space on the right have lines to guide my handwriting.

With that in mind, I tried to use the Pages per sheet function when printing a PDF. I would insert a blank sheet (imagine it has lines) –of the same size as a slide– in between each slide and then put 2 pages per sheet. Sadly, no matter the combination of the orientations, sheet sizes, and rotations I tried, the output would look bad: two portrait pages stitched with 2 pages per sheet look as two portrait pages in one landscape sheet, and two landscape pages stitched with 2 pages per sheet look as two landscape pages in one portrait sheet. This results with very big top and bottom margins that I don't want: https://i.sstatic.net/GVO4G.png

What I need is the lecture slide (in landscape, so it doesn't have unwanted margins) stitched with a lined space (big, ideally of the same size of the slide) to it's right side. I'd prefer the solution to be programmable or automatable.

2
  • Thanks @KJ! I think I've managed a solution using cpdf. I interleaved the slides with lined pages the same size as the first ones. cpdf has a command -twoup-stack that allows me to put two pages next to each other, doubling the sheet size. Now each slide has a ruled page on its right. I'm still working on the details, I'll keep you posted! Thanks a lot.
    – sguridirt
    Commented Mar 15 at 11:57
  • As for the lined pages, I'm creating them programmatically using jsPDF. It will allow me to adapt to different sheet sizes in the future.
    – sguridirt
    Commented Mar 15 at 12:02

1 Answer 1

0

I suggested this might be done using pdfcpu as it is very light yet powerful as a single executable (Currently V 0.7 is 10 MB).

I aimed for pairing LaTeX Beamer or PowerPoint Slide sources as roughly to be position in 2 left hand quartiles with lines on the right like this full-screen view. Note I have kept page 1 blank for adding a "Handout" cover page. pdfcpu can easy add Logo/ Subject Title and other written data as a last pass. or if as here the cover is in the notes then adjust that to be stamped larger on the first page (it will be one extra command line and a small tweak to the existing stamper line.

enter image description here

This was the Windows "ComManD" script where you simply drag and drop the Lecture notes onto the script. The final name is "done.pdf" but that could be feedback to the source folder by using "%~dpn1-done.pdf" or as you wish?

set "cwd=%~dp0%"

REM Count source pages and prepare a4L backdrop from half page count

%cwd%pdfcpu info "%~1"|find /i "page count">count.txt
for /f "tokens=3" %%c in (count.txt) do set count=%%c && set /a pairs=(1+count) / 2
REM reset count of 2nd template pages
echo|set /p "=1" 1>count2.txt
for /l %%c in (1,1,%pairs%) do echo|set /p"=,2" 1>>count2.txt
set /p string=<count2.txt
pdfcpu collect -p %string% BackDraft.pdf BackDrop.pdf

REM Prepare the Left hand (A5) nup
%cwd%pdfcpu nup -- "formsize:A5P, border:off" Nup.pdf 2 "%~1"

REM Overstamp Nup on BackDrop
%cwd%pdfcpu stamp add -m pdf -- "Nup.pdf:1:2" "pos:l, rot:0, scale:1.0 abs" BackDrop.pdf done.pdf

pause

The specially crafted 2 page "template" BackDraft.pdf, is as follows, but beware cut and paste notes below.

%PDF-1.4
%ÞЃ²
1 0 obj <</Type/Catalog/Pages 2 0 R/Metadata null >> endobj
2 0 obj <</Type/Pages/Count 2/Kids[3 0 R 4 0 R]>> endobj
3 0 obj <</Type/Page/Parent 2 0 R/MediaBox[0 0 841 595]/Contents null /Resources<<>>>>endobj
4 0 obj <</Type/Page/Parent 2 0 R/MediaBox[0 0 841 595]/Contents 5 0 R/Resources<<>>>>endobj
5 0 obj <</Length 744>>stream
1.0 0.5 0.5 RG
421 000 m 421 595 l s
0.5 0.5 1.0 RG
421 007 m 841 007 l s  421 027 m 841 027 l s  421 047 m 841 047 l s  421 067 m 841 067 l s  421 087 m 841 087 l s
421 107 m 841 107 l s  421 127 m 841 127 l s  421 147 m 841 147 l s  421 167 m 841 167 l s  421 187 m 841 187 l s
421 207 m 841 207 l s  421 227 m 841 227 l s  421 247 m 841 247 l s  421 267 m 841 267 l s  421 287 m 841 287 l s
421 307 m 841 307 l s  421 327 m 841 327 l s  421 347 m 841 347 l s  421 367 m 841 367 l s  421 387 m 841 387 l s
421 407 m 841 407 l s  421 427 m 841 427 l s  421 447 m 841 447 l s  421 467 m 841 467 l s  421 487 m 841 487 l s
421 507 m 841 507 l s  421 527 m 841 527 l s  421 547 m 841 547 l s  421 567 m 841 567 l s  421 587 m 841 587 l s
endstream
endobj
xref
0 6
0000000000 65536 f  0000000017 00000 n  0000000078 00000 n  0000000136 00000 n  0000000230 00000 n  0000000324 00000 n
trailer
<</Size 6/Root 1 0 R>>
startxref
1119
%%EOF

Notes Page 1 is intentionally a blank "placeholder" page for later cover , do not attempt to add content (currently set to "null") unless you edit the whole file in a PDF editor.

Windows cut and paste should use MS Notepad and save as ANSI format. If that works the file will be correctly 1,307 bytes enter image description here

If it is not you need to consider why (there is one Windows line feed at the end of each line) as the included decimal address pointers only are designed for that file byte length. If you are using a Mac or Linux simple editor the line endings can be a space and a Linux single \x0A character line feed after that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .