I sometimes have the need or desire to turn a bunch of individual PDFs into one, easier for printing and archiving. By hand, I most often do this with Imagemagick 'convert', but when I tried just this morning, Leap 15.2 -
convert 001610523-2020-*-statement.pdf klop.pdf convert: not authorized `001610523-2020-01-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-02-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-03-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-04-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-05-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-06-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-07-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-08-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-09-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-10-statement.pdf' @ error/constitute.c/ReadImage/428. convert: not authorized `001610523-2020-11-statement.pdf' @ error/constitute.c/ReadImage/428. convert: no images defined `klop.pdf' @ error/convert.c/ConvertImageCommand/3275.
I changed to ghostscript instead, worked a treat:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=001610523-2020-statement.pdf -dBATCH 001610523-2020-*-statement.pdf
I guess something changed with Imagemagick ?
On 04.11.2021 11:35, Per Jessen wrote:
I sometimes have the need or desire to turn a bunch of individual PDFs into one, easier for printing and archiving. By hand, I most often do this with Imagemagick 'convert', but when I tried just this morning, Leap 15.2 -
convert 001610523-2020-*-statement.pdf klop.pdf convert: not authorized `001610523-2020-01-statement.pdf' @ error/constitute.c/ReadImage/428.
...
I guess something changed with Imagemagick ?
Is the following of any help?
https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-erro...
Andrei Borzenkov wrote:
On 04.11.2021 11:35, Per Jessen wrote:
I sometimes have the need or desire to turn a bunch of individual PDFs into one, easier for printing and archiving. By hand, I most often do this with Imagemagick 'convert', but when I tried just this morning, Leap 15.2 -
convert 001610523-2020-*-statement.pdf klop.pdf convert: not authorized `001610523-2020-01-statement.pdf' @ error/constitute.c/ReadImage/428.
...
I guess something changed with Imagemagick ?
Is the following of any help?
https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-erro...
I did look at that one earlier, and made the proposed change to policy.xml - yes, in a way it helped, but in the result, the pages were blurred and difficult to read. With ghostscript, crisp and clear.
On 2021-11-04 10:04, Per Jessen wrote:
blurred and difficult to read. With ghostscript, crisp and clear
Is it not because convert really converts to an image and gs does not touch the images inside the PDF files?
The jdd version is the most effective. Twice as fast as qpdf and twenty times faster than gs.
Bengt Gördén wrote:
On 2021-11-04 10:04, Per Jessen wrote:
blurred and difficult to read. With ghostscript, crisp and clear
Is it not because convert really converts to an image and gs does not touch the images inside the PDF files?
I think quite possibly, yes. I just don't recall having noticed it before.
The jdd version is the most effective. Twice as fast as qpdf and twenty times faster than gs.
fwiw, I got 6 times faster with pdfunite over gs :-) still worked very well, never even heard of that one.
On 2021-11-04 09:35, Per Jessen wrote:
convert: no images defined `klop.pdf' @ error/convert.c/ConvertImageCommand/3275.
Could it be the security options? I've run into that a couple of times. /etc/ImageMagick-7/policy.xml
I usually merge my PDF files like this: qpdf --empty --pages file1.pdf file2.pdf -- outfile.pdf
before the pdftk debacle I did it like this: pdftk *.pdf cat output outfile.pdf
jdd@dodin.org wrote:
I just did (15.3)
pdfunite ft*.pdf fiche.pdf
Yes, it worked fine with ghostscript too, I was just surprised that it didn't work with imagemagick.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
El 2021-11-04 a las 10:16 +0100, Per Jessen escribió:
jdd@dodin.org wrote:
I just did (15.3)
pdfunite ft*.pdf fiche.pdf
Yes, it worked fine with ghostscript too, I was just surprised that it didn't work with imagemagick.
pdfunite is new to me. In my notes about "join pdf" (old) I have:
joinpdf lost. http://www.iis.ee.ic.ac.uk/~g.briscoe/joinPDF/ psmerge with ps files pdftk http://www.accesspdf.com/pdftk/ --> compile. (SLS, Oct 2004) itext http://www.lowagie.com does anything with a pdf, but it is a lib.
gs -dNOPAUSE -sDEVICE=pswrite -sOutputFile=out.ps \ file1.ps file2.ps ... -c quit
ps2pdf -dPDFSETTINGS=/screen * /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting. * /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting. * /printer selects output similar to the Acrobat Distiller "Print Optimized" setting. * /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting. * /default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger
ColourImageResolution: 72, 150, 300, 300 MonoImageResolution: 300, 300, 1200, 1200
(file:///home/cer/doc/packages/ghostscript/doc/Ps2pdf.htm)
pdftk (much less memory than gs)
Join in1.pdf and in2.pdf into a new PDF, out1.pdf pdftk in1.pdf in2.pdf cat output out1.pdf or (using handles): pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf or (using wildcards): pdftk *.pdf cat output combined.pdf
And now pdftk is not.
Adding pdfunite (poppler-tools) to my notes.
- -- Cheers Carlos E. R.
(from openSUSE Leap 15.2 x86_64 (Minas Tirith))
Thu, 4 Nov 2021 12:11:44 +0100 (CET) időpontban Carlos E. R. írta:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
El 2021-11-04 a las 10:16 +0100, Per Jessen escribió:
jdd@dodin.org wrote:
I just did (15.3)
pdfunite ft*.pdf fiche.pdf
Yes, it worked fine with ghostscript too, I was just surprised that it didn't work with imagemagick.
pdfunite is new to me. In my notes about "join pdf" (old) I have:
joinpdf lost. http://www.iis.ee.ic.ac.uk/~g.briscoe/joinPDF/ psmerge with ps files pdftk http://www.accesspdf.com/pdftk/ --> compile. (SLS, Oct 2004) itext http://www.lowagie.com does anything with a pdf, but it is a lib.
gs -dNOPAUSE -sDEVICE=pswrite -sOutputFile=out.ps \ file1.ps file2.ps ... -c quit
ps2pdf -dPDFSETTINGS=/screen * /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting. * /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting. * /printer selects output similar to the Acrobat Distiller "Print Optimized" setting. * /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting. * /default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger
ColourImageResolution: 72, 150, 300, 300 MonoImageResolution: 300, 300, 1200, 1200
(file:///home/cer/doc/packages/ghostscript/doc/Ps2pdf.htm)
pdftk (much less memory than gs)
Join in1.pdf and in2.pdf into a new PDF, out1.pdf pdftk in1.pdf in2.pdf cat output out1.pdf or (using handles): pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf or (using wildcards): pdftk *.pdf cat output combined.pdf
I also use pdftk for concatenating or rearranging pdf documents. It is in the packman repo for Leap 15.1
And now pdftk is not.
Why? Did you have any problem with it?
Istvan
On 04/11/2021 12.26, Istvan Gabor wrote:
Thu, 4 Nov 2021 12:11:44 +0100 (CET) időpontban Carlos E. R. írta:
...
pdftk (much less memory than gs)
Join in1.pdf and in2.pdf into a new PDF, out1.pdf pdftk in1.pdf in2.pdf cat output out1.pdf or (using handles): pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf or (using wildcards): pdftk *.pdf cat output combined.pdf
I also use pdftk for concatenating or rearranging pdf documents. It is in the packman repo for Leap 15.1
And now pdftk is not.
Why? Did you have any problem with it?
I don't remember what happened, only that I don't have it installed, and the comment from Bengt. Installing it now, thanks for saying where it is now.
On 2021-11-04 12:45, Carlos E. R. wrote:
On 04/11/2021 12.26, Istvan Gabor wrote:
Why? Did you have any problem with it?
I don't remember what happened, only that I don't have it installed, and the comment from Bengt. Installing it now, thanks for saying where it is now.
When gcj disappeared due to gcc7, so did pdftk. Eventually pdftk got back [1].
[1] https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/5...
On 04/11/2021 14.43, Bengt Gördén wrote:
On 2021-11-04 12:45, Carlos E. R. wrote:
On 04/11/2021 12.26, Istvan Gabor wrote:
Why? Did you have any problem with it?
I don't remember what happened, only that I don't have it installed, and the comment from Bengt. Installing it now, thanks for saying where it is now.
When gcj disappeared due to gcc7, so did pdftk. Eventually pdftk got back [1].
[1] https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/5...
Ah, I remember now :-)
Got back to Packman, not to the main distro, the problem was unsolvable. I wonder what Packman people did, keep using gcc 6?
On 2021-11-04 15:11, Carlos E. R. wrote:
I wonder what Packman people did, keep using gcc 6?
Think it's in factory. It uses ant.
If you have login: https://build.opensuse.org/package/view_file/openSUSE:Factory/pdftk/pdftk.sp...
BuildRequires: ant BuildRequires: apache-commons-lang3 BuildRequires: bouncycastle Requires: apache-commons-lang3 Requires: bouncycastle Requires: jre >= 11
Dne čtvrtek 4. listopadu 2021 15:32:41 CET, Bengt Gördén napsal(a):
Think it's in factory. It uses ant. If you have login: https://build.opensuse.org/package/view_file/openSUSE:Factory/pdftk/ pdftk.spec?expand=1
Yep, I use it in TW. I also still keep old local install of pdftk-qgui and of that few Qt4 libraries. It also work, but I wonder if there is some better GUI...
On 04/11/2021 15.42, Vojtěch Zeisek wrote:
Dne čtvrtek 4. listopadu 2021 15:32:41 CET, Bengt Gördén napsal(a):
Think it's in factory. It uses ant. If you have login: https://build.opensuse.org/package/view_file/openSUSE:Factory/pdftk/ pdftk.spec?expand=1
Yep, I use it in TW. I also still keep old local install of pdftk-qgui and of that few Qt4 libraries. It also work, but I wonder if there is some better GUI...
Packman also has pdftk-qgui, but I have not tried it.
Le 04/11/2021 à 12:11, Carlos E. R. a écrit :
pdfunite is new to me. In my notes about "join pdf" (old) I have:
it may have changed name erc ently. I usually do "pdf <TAB>" to see the hole bunch of filters
pdf2dsc pdfattach pdffonts pdfinfo pdfroff pdfsig pdftohtml pdftops pdfunite pdf2ps pdfdetach pdfimages pdfmom pdfseparate pdftocairo pdftoppm pdftotext
jdd
Le 04/11/2021 à 10:16, Per Jessen a écrit :
jdd@dodin.org wrote:
I just did (15.3)
pdfunite ft*.pdf fiche.pdf
Yes, it worked fine with ghostscript too, I was just surprised that it didn't work with imagemagick.
giving what you said (image blurred), it looks like imagemagic is resizing the files, when pdfunite only concatenate them
I used this to remove other language part on a 10 languages manual :-). First split, then unite jdd