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](https://cdn.statically.io/img/i.sstatic.net/Efvsc.png)
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](https://cdn.statically.io/img/i.sstatic.net/GISod.png)
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.
-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.