I faced with following problem with using ImageMagic. I have Java EE web application which need to make some thumbnails from uploaded PDFs. 3rd party application uploads PDFs to my application.
My application tryes to convert this PDF (and others) via following command
convert some.pdf -auto-orient -resize 100x100> some.png
As result of convertation I have this PNG. I'm trying for 3 days but wasn't able to figure out whats wrong with uploaded PDFs. Other PDFs is converted in correct way. What's wrong with this PDFs and how to convert it right?
Note: Imagemagick V6.8.6.6, GhostScript 8.64.
Upgrading your version of GhostScript should fix the problem. Ghostscript is responsible for creating an image from your PDF file. With the latest version (9.10) a correct image is created.
Related
I have a program that outputs a PDF file using PDFBox (It merges a bunch of PDFs using PDFMergerUtility).
I need to use Acrobat 5 to read that PDF, but in some pages i get Error proccesing page. A drawing error ocurred.
I cant update my acrobat so, there is a way to downgrade the PDF using PDFbox?
I know there's tons of threads about this "out there" but all I can find is bitmap to pdf and how do add images to a PDF.
I have a PDF which I would like to convert to JPEG. I've tried to use the iTextSharp but I can only find info about making a pdf, not the other way araound. Any ideas or links to actual code?
ImageMagick uses Ghostscript to handle PDFs so if this is your only task I'd recommend just using Ghostscript. There's a managed wrapper here and you can get the Ghostscript binaries from here. They come in an installer but you can just extract them using 7-Zip. See this discussion on what you need to deploy in your app. You might have to play around with 32-bit vs 64-bit. Also, on the Ghostscript download page please read the "Which license is right for me?" section.
I have a crazy issue that's driving me insane :)
Using highcharts export to PDF feature, it generates the graph data but without text.
I am using Debian 6 and installed the libbatik-java which had a transcode issue when it came to exporting to PDF. After some reading the solution found on stackoverflow was to download batik from apache's site which I done and can now export to PDF.
However the text isnt shown as it appears to be rendered off screen because when I edit one the x/y values it can then see the text.
I works perfectly fine when exporting to PNG or JPG.
I also copied the SVG to another server which is running AIX and ran batik command there and it converted to PDF without issues.
I also tried copying the batik DIR from our AIX box to the Debian box but still have the same problem.
Not sure what else I can do :(
Any help would be appreciated.
We are using Tesseract's Java library, Called Tess4j to convert PDF files to text.
It works nicely with Tiff files as well as one page PDF files. But with multi-page PDF's it does generate the output file, when it comes to the last page, the control doesn't seem to come back to the original application which invoked the doOCR call. It just stays/hangs there without doing anything.
Is it an issue with the native call not returning back.i have no clue,
Please let me know if there is a solution to this issue, as soon as possible.
Regards
Vish
Tess4J does support multi-page PDF and multi-page TIFF. Substitute with your PDF file in the unit test case and give it a try.
I'm attempting to convert a PDF to a JPEG using ImageMagick.
The PDF:
baby_aRCWTU.pdf
The command:
convert -density 260 -profile 'SWOP.icc' -profile 'sRGB.icm' 'baby_aRCWTU.pdf' 'baby_aRCWTU.jpg'
The resulting JPEG:
baby_aRCWTU.jpg
As you can see, the text is rendered nicely, but the embedded image shows up as a green square. Any ideas? This occurs with and without the colour profiles.
edit: reposted due to broken links
On a site we convert hundreds of PDF's on a daily basis where we need to create JPGs and we found it only reliable to convert the PDF's to postscript first.
We use the "pdftops" command, try
pdftops baby_aRCWTU.pdf baby_aRCWTU.ps
then your convert command above, but on the ps. Works for me, the image is then included.