I have 8 plot, just for sample data
p1 = Plot[x, {x, 1, 5}];
p2 = Plot[x^2, {x, 1, 5}];
p3 = Plot[x^3, {x, 1, 5}];
p4 = Plot[x^4, {x, 1, 5}];
p5 = Plot[x^5, {x, 1, 5}];
p6 = Plot[x^6, {x, 1, 5}];
p7 = Plot[x^7, {x, 1, 5}];
p8 = Plot[x^8, {x, 1, 5}];
which I want to export in PDF as 4 plots in each page. So I tried
g1=GraphicsGrid[{{p1, p2}, {p3, p4}}];
g2=GraphicsGrid[{{p5, p6}, {p7, p8}}];
Export["plot.pdf", {g1, g2}]
where p's are my plots. However this code produces a PDF file as all plots are in a single page. I searched Mathematica SE and just found
nb = CreateDocument[ExpressionCell[#, PageBreakBelow -> True] & /@ g1];
Export["plots.pdf", nb]
but this didn't work or maybe I didn't know how to use it. Any idea?
pdfunite(a part of Poppler utilities). – Alexey Popkov Sep 03 '21 at 18:32