logoalt Hacker News

2Gkashmiritoday at 4:29 AM2 repliesview on HN

This gave me an idea. You seem to be the right person to talk to.

Here is my workflow. Have a bunch of PDFs and images I need to combine.

I go to tools.PDF24.org, Merge pdfs, then compress them, then more compress them because of size limits, then add or remove pages. Then add page numbers.

These are multiple steps.

Could we have a way of defining these terms at start, either textual or no-code-like or something where we could define stuff like

Take input, merge > compress with greyscale, Max size 1MB, add page numbers on bottom right

Or

Convert input to jpg with image size 8cm by 8cm

I know many people who simply fail at such stuff. They just throw their hands up in defeat.

Not saying we should have llms do the job but if we could have multiple actions so that people could tell the software what they have in mind.

People dont just compress PDFs, often merge and then compress.

I recently say pdfux.com but it is not as featureful as PDF24 but PDF24 crashes a lot.


Replies

Beijingertoday at 5:20 AM

#!/bin/bash

# Convert images to PDF

img2pdf *.jpg -o images.pdf

# Merge PDFs

pdfunite file1.pdf file2.pdf images.pdf merged.pdf

# Compress

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \ -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf merged.pdf

# Remove unwanted pages (e.g., page 3)

pdftk compressed.pdf cat 1-2 4-end output final.pdf

# Add page numbers

pdfjam final.pdf --outfile final_numbered.pdf --pagecommand '{}' --landscape

show 3 replies
denfromufatoday at 5:22 AM

If you can define this as a feature request to pdfmini, please submit it on github, e.g. drag-and-drop flow builder