Search found 13 matches
- 2013-08-13T10:22:18-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
I tried it with an example photo which worked. For some reason, the search pattern and search image attached will run till the server kills it. I attached them (SearchImage.jpg//SearchPattern.png). I tried it with a small version (attached SearchImageZ/SearchPatternZ) which returned the error ...
- 2013-08-12T20:52:15-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
I tried Imagick compare, but got an error: $Page = new Imagick('Result-0.png'); $Page2 = new Imagick('SearchPatternPNG.png'); $Result = $Page2 -> compareImages($Page, Imagick::COMPOSITE_SATURATE); $Result[0] -> setImageFormat('jpeg'); echo $Result[0]; Fatal error: Uncaught exception ...
- 2013-08-12T15:08:22-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
Removing the majority of it seems reasonable actually. By looking at convert subimage-search and possibly morphology, it seems doable. I've toyed around with it but I can't get it to work. I'd pay you (or anyone) who could figure out how to mostly remove it so OCR would work good. I attached the ...
- 2013-08-12T13:35:36-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
I've found that the height of the document determines the angle of the watermark, as well as the size. I wonder if it's possible to pattern match the watermark, and then remove it? It looks like that is what you were talking about with morphology. I don't understand it, but I'm going to go through ...
- 2013-08-12T11:43:12-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
I'm trying to remove it enough for OCR to read the text correctly. I uploaded a compressed folder of all the documents at http://www.filedropper.com/files_2 Sorry for the download site, but it's 9MB and I couldn't upload it here. *Be sure to click the gray "Download this file" and not the big green ...
- 2013-08-12T10:25:54-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
My goal of this was to overlay an inverted watermark and drown it out enough so I could OCR a bunch of document for research. The watermark is there for printing the documents, which I don't care about. Most people run from "remove watermark", but I'm not using for the purpose of the watermark. I ...
- 2013-08-09T17:56:29-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
Well I did determine that it is something unique about the PDF that's causing it. Attached are two PDFs. Dumb.pdf is one that produces a margin, and Dumb2.pdf does not. It does it with this conversion: gs -q -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=O4.png dumb.pdf -c quit
Any ideas why?
Any ideas why?
- 2013-08-09T17:43:04-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
I attached the result. It looks like it replaces the margin with a white background. This is still not possible to work with, since I need the document to be the same conversion at the second. If all the pages had the same margin, it wouldn't matter. It's really odd that this is happening, because ...
- 2013-08-09T15:39:11-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
And to add a bit more... I did try : exec('gs -q -dNOPAUSE -sDEVICE=tiffg4 -sOutputFile=temp3.tif temp2.pdf -c quit'); This converted the PDF to the same exact size. I really don't care how it's done as long as I get the same results every time. This works, although I don't know how to change the ...
- 2013-08-09T15:31:07-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
Attached is another example of what I'm seeing in Fireworks. The canvas sizes are the same, but the first page's document is a different size.
- 2013-08-09T15:27:04-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
You'll have to save the image as the margin doesn't show in the browser. I saved it via browser and opened it in Fireworks and I can see it.
I just installed it yesterday with yum, so I believe they are up to date. I'll check on the GS too, and try out the exec method.
I just installed it yesterday with yum, so I believe they are up to date. I'll check on the GS too, and try out the exec method.
- 2013-08-09T09:38:22-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
Re: PDF to image causes 1st page margin
Thanks for the help! I have attached the PDF and the result PNGs. The PDF is zipped to allow for upload. I'm not real sure how to apply repage or clip with the PHP I'm using. Just run an exec right after reading the image? If either of those is the issue, could you show me example code to mix in ...
- 2013-08-08T18:39:41-07:00
- Forum: IMagick
- Topic: PDF to image causes 1st page margin
- Replies: 21
- Views: 27449
PDF to image causes 1st page margin
I am trying to convert a PDF to a jpg/png. They need to be exact every time, and the first page of the PDF is producing a margin on the right as shown in the attached picture. Anyone have any ideas why this might be happening? [php] $Page = new Imagick(); $Page -> setResolution(450,450); $Page ...