Mobileread
How can I split up different-sized pages?
#1  MarjaE 09-21-2022, 10:56 PM
I need to split some pages of a pdf into 5 vertical sections, and other pages into 4 overlapping quadrants.

I've looked online, but however I try to word it, all the results are about splitting *between* pages, not splitting the pages...

I am using Mac OS 10.14.6, and have brew, ghostscript, k2pdfopt, the free part of cpdf, qpdf, etc. as well as Mac-specific view and conversion apps. I tend to use Automator with bash shell scripts for conversion, so don't know much about the guis for k2pdfopt.

I know there's PdfCropper, but i looks like it's specifically for Windows.
Reply 

#2  Quoth 09-22-2022, 06:46 AM
I think ImageMagick works on all platforms.
Say you have three columns?
Run it 3 times with different margin settings.
Note on Linux (and maybe Mac) the default security forbids PDF. Reading & writing PDF has different settings. I only enable writing and use The GIMP to convert a PDF at desired resolution to a stack of images then Exported in reverse order as mpng (animated png) for ImageMagick to read.

For quadrants you read the same source 4 times with different margins.
Reply 

#3  willus 09-23-2022, 05:28 PM
This is exactly what the -grid option in k2pdfopt is for. You can use it for both of the things you wanted to do.
Reply 

#4  MarjaE 09-23-2022, 06:57 PM
Thanks. With k2, I'd have to run different grid settings for every few pages.
Reply 

#5  willus 09-23-2022, 11:35 PM
Quote MarjaE
Thanks. With k2, I'd have to run different grid settings for every few pages.
That's correct. You could specify the pages you want to convert with the -p option for each set and then join them with something like cpdf or qpdf.
Reply 

#6  Quoth 09-24-2022, 11:16 AM
Quote willus
This is exactly what the -grid option in k2pdfopt is for. You can use it for both of the things you wanted to do.
Yes, that too and may be simpler than ImageMagick which while powerful is a bit arcane. For some reason I thought it was only for Windows. My bad.
https://willus.com/k2pdfopt/download/
Reply 

Today's Posts | Search this Thread | Login | Register