Convert PDF to PNG is very fast, like Verisign / Docusign

I used PDF to PNG conversions and tried both ImageMagick and Ghostscript.

I have a 36-page document, which is split into separate PDF files. FASTEST I got this down conversion for all 36 pages on an i7 Linux machine with 8 GB of RAM for about 20 seconds.

I see VeriSign / DocuSign, and even, of course, Adobe EchoSign can convert all these files to a “preview” in less than 10 seconds (sometimes about 5 seconds).

Is there something I am missing? Is it literally just about the car itself?

This is the fastest way to get them converted using Ghostscript and this command:

gs -q -dQUIET -qNODISPLAY -dNumRenderingThreads=4 -dNOPAUSE \
   -sDEVICE=jpeg -sOutputFile=$exportPathCleaned -dJPEGQ=90 \
   -r100 -q $pdf -c quit

Is it really impossible to reach their speed? EDIT PHP / Java Platforms - This is what I aim for

EDIT 2 for clarification . Wanting to be able to do this, to develop a similar system for VeriSign / DocuSign, etc., so that div and other elements can be placed on the output representation. As far as I know, you cannot do this with a direct PDF file, so they convert everything to images.

+4
source share
2 answers

I used this command on a 4-year-old MacBook Pro with 4 GB of RAM, processing a linked PDF sample:

$> time gs -q -sDEVICE=jpeg -o evs-%02d.jpg -dJPEGQ=90 -r100 EVS.pdf

which returns 11 jpegs, with this time information:

real  0m1.011s
user  0m1.063s
sys   0m0.091s

That is: ~1 secfor 11 pages.

PDF. PDF- , Ghostscript :

**** Warning: can't process font stream, loading font by the name.

**** This file had errors that were repaired or ignored.
**** The file was produced by: 
**** >>>> Acrobat Distiller 9.5.5 (Windows) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe published PDF
**** specification.

231 .

, () , :

$> pdffonts Documents/pdfs/EVS.pdf

name                      type          encoding     emb sub uni object ID
------------------------- ------------- ------------ --- --- --- ---------
TimesNewRomanPSMT         TrueType      WinAnsi      no  no  no     636  0
TimesNewRomanPS-BoldMT    TrueType      WinAnsi      no  no  no     638  0
Arial-Black               TrueType      WinAnsi      no  no  no     335  0
EPBFLF+Cambria            CID TrueType  Identity-H   yes yes yes    332  0
Helvetica                 Type 1        Custom       no  no  no     511  0
ArialMT                   TrueType      WinAnsi      no  no  no     476  0
FAMLHA+Wingdings-Regular  CID TrueType  Identity-H   yes yes yes    496  0
TimesNewRomanPS-ItalicMT  TrueType      WinAnsi      no  no  no     495  0

, Ghostscript ...

  • ... -,
  • ... ,
  • ... JPEG.

JPEG , PDF !

, PDF :

$> time gs -q -sDEVICE=jpeg -o evs-%02d.jpg -dJPEGQ=90 -r100 EVS-emb.pdf

 real  0m0.731s
 user  0m0.642s
 sys   0m0.072s
+2

ubuntu, pdf images\png

for f in *.pdf; do convert -quality 100 $f ${f%%.*}.jpg; done
0

All Articles