I've used your original command (which I only re-formatted for readability):
mkdir trimmed-combined
for i in *pdf ; do
pdftk “$i” cat 2 output “trimmed-combined/trimmed-combined1.pdf” ;
done
I'm getting the exact same errors as you did...
But as already @MartinSchröder observed in a comment, and as I noticed when editing your OP for improved readability, the quotes you used are:
$ unicode “”
U+201C LEFT DOUBLE QUOTATION MARK
UTF-8: e2 80 9c UTF-16BE: 201c Decimal: “
“
Category: Pi (Punctuation, Initial quote)
Bidi: ON (Other Neutrals)
U+201D RIGHT DOUBLE QUOTATION MARK
UTF-8: e2 80 9d UTF-16BE: 201d Decimal: ”
”
Category: Pf (Punctuation, Final quote)
Bidi: ON (Other Neutrals)
I assume you have copied'n'pasted (some parts of) this command from a HTML-email, or from a PDF document, or from some web page which used "smart" quotes. These quotes will not work in a shell as intended. You need to use the ASCII quotes:
$ unicode \"
U+0022 QUOTATION MARK
UTF-8: 22 UTF-16BE: 0022 Decimal: "
"
Category: Po (Punctuation, Other)
Bidi: ON (Other Neutrals)
So change your command to this, and everything will work as expected:
mkdir trimmed-combined
for i in *pdf ; do
pdftk "$i" cat 2 output "trimmed-combined/trimmed-combined1.pdf" ;
done