Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 05-05-2009, 10:26 PM   #1
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
Is there a tool can remove the blank margin of picture?

I convert a PDF to png then I need to remove the blank margin of the result pictures.
Does there any tools can do this job?

Thanks.
alxwang is offline   Reply With Quote
Old 05-05-2009, 11:12 PM   #2
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by alxwang View Post
I convert a PDF to png then I need to remove the blank margin of the result pictures.
Does there any tools can do this job?

Thanks.
If you use PDFRead on that .pdf, it can then return a directory full of .png's that all have any excess white margins removed (and are optionally dilated/sharpened).

Give it a try and select .html as your out(put) format.
nrapallo is offline   Reply With Quote
Old 05-05-2009, 11:48 PM   #3
montsnmags
Grand Sorcerer
montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.
 
Posts: 10,155
Karma: 4632658
Join Date: Nov 2007
Device: none
If you still wish to work on the images, and they all have the same margins, and if you use a variety of MS Windows, you could try Irfanview's batch options, which I believe include cropping.

I used to install Irfanview on pretty much any MS Windows machine I had, and work's, and on those of friends and family (after explaining, and being given permission). It was my default "image viewer" of choice.

Cheers,
Marc
montsnmags is offline   Reply With Quote
Old 05-05-2009, 11:59 PM   #4
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by montsnmags View Post
I used to install Irfanview on pretty much any MS Windows machine I had, and work's, and on those of friends and family (after explaining, and being given permission). It was my default "image viewer" of choice.

Cheers,
Marc
Marc:

I do the exact same thing. I'm also the "IT guy" at work and set irfanview as the default viewer and print program of (huge) .jpgs.

This especially comes in handy when my staff need to print emails with large embedded jpeg's and Outlook Express doesn't know how to shrink them to fit the printed page...

(Neither do MS paint or IE!!!)
nrapallo is offline   Reply With Quote
Old 05-06-2009, 12:12 AM   #5
montsnmags
Grand Sorcerer
montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.
 
Posts: 10,155
Karma: 4632658
Join Date: Nov 2007
Device: none
Quote:
Originally Posted by nrapallo View Post
Marc:

I do the exact same thing. I'm also the "IT guy" at work and set irfanview as the default viewer and print program of (huge) .jpgs.

This especially comes in handy when my staff need to print emails with large embedded jpeg's and Outlook Express doesn't know how to shrink them to fit the printed page...

(Neither do MS paint or IE!!!)
Although my official role was "IT Project Manager", I was the unofficial "IT guy" for the office too. In that MS world, I'd rate Irfanview as one of the finest Windows-only apps out there. If it had Linux and OSX versions that didn't require emulators (or, in the case of WINE, "Not Emulators" ) it'd be one of the first pieces of software I'd have downloaded onto my lappy and iMac. Fast, small, efficient, sufficient, works.

Cheers,
Marc
montsnmags is offline   Reply With Quote
Old 05-06-2009, 07:02 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
The Gimp can "autocrop".

With ImageMagick I think you can use -trim or this script
Jellby is offline   Reply With Quote
Old 05-06-2009, 10:53 PM   #7
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
Thanks a lot! Irfanview is so nice! I love its batch tools. ACDSEE finally retire from my computer.
I have some chinese PDF in ANSI(GB2312) code. I never can read it in dr1000. PDFRead's result basic just dark area. The only thing I can do is use acrobat to export it to png.

Last edited by alxwang; 05-06-2009 at 11:05 PM.
alxwang is offline   Reply With Quote
Old 05-06-2009, 11:16 PM   #8
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by alxwang View Post
Thanks a lot! Irfanview is so nice! I love its batch tools. ACDSEE finally retire from my computer.
I have some chinese PDF in ANSI(GB2312) code. I never can read it in dr1000. PDFRead's result basic just dark area. The only thing I can do is use acrobat to export it to png.
Well, in that case, DON'T use the .pdf with PDFRead, but instead the resulting .png's created by Acrobat.

Just use In(put) Format as imgdir (browse to your .png directory and double-click the first file) and Convert as before.

If the acrobat created .png's were of low quality, then turn off dilation by selecting the checkbox 'no dilation' so as to get a clearer image.

Hope this helps!
Attached Thumbnails
Click image for larger version

Name:	PDFRead-strips image margins too.jpg
Views:	321
Size:	48.2 KB
ID:	28564  
nrapallo is offline   Reply With Quote
Old 05-08-2009, 01:40 PM   #9
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
Yup. It works but I never can generate prc file. It always just popup %temp%\pdfreadxxx directory for me.
But I got the pictures anyway.
Thanks.
alxwang is offline   Reply With Quote
Old 05-08-2009, 01:52 PM   #10
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by alxwang View Post
ACDSEE finally retire from my computer.
I still use ACDSee v1.0 as MY default .jpg viewer, especially when I just want to view one .jpg. It works just fine for me, but it's got some limitations, in which case then I just use irfanview.

Quote:
Originally Posted by alxwang View Post
Yup. It works but I never can generate prc file. It always just popup %temp%\pdfreadxxx directory for me.
But I got the pictures anyway.
Thanks.
For .prc output, did you install the updated NRhtml2mobi.zip?
nrapallo is offline   Reply With Quote
Old 05-08-2009, 04:24 PM   #11
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
Just did.
I download that zip and decomress the exe to same folder as pdfread, is that correct?
I got same result.
Thanks.
alxwang is offline   Reply With Quote
Old 05-08-2009, 04:31 PM   #12
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by alxwang View Post
Just did.
I download that zip and decomress the exe to same folder as pdfread, is that correct?
I got same result.
Thanks.
Yes and no, in particular, it goes into the 'bin' directory inside the PDFRead install directory, which by default is C:\Program files\PDFRead\bin. It's the same directory as 'pdfread.exe', if that's what you meant!

You should get a message that you are overwriting the existing one (placed there by the PDFRead Installer and not the one you placed there before ).

Last edited by nrapallo; 05-08-2009 at 04:34 PM.
nrapallo is offline   Reply With Quote
Old 05-12-2009, 11:45 AM   #13
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
I did and I still got this error message:
Creating file ... failed, error details follow.

Traceback (most recent call last):
File "output.pyc", line 143, in generate_imp
File "win32com\client\__init__.pyc", line 95, in Dispatch
File "win32com\client\dynamic.pyc", line 98, in _GetGoodDispatchAndUserName
File "win32com\client\dynamic.pyc", line 78, in _GetGoodDispatch
com_error: (-2147221005, 'Invalid class string', None, None)
alxwang is offline   Reply With Quote
Old 05-12-2009, 11:57 AM   #14
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by alxwang View Post
I did and I still got this error message:
Creating file ... failed, error details follow.

Traceback (most recent call last):
File "output.pyc", line 143, in generate_imp
File "win32com\client\__init__.pyc", line 95, in Dispatch
File "win32com\client\dynamic.pyc", line 98, in _GetGoodDispatchAndUserName
File "win32com\client\dynamic.pyc", line 78, in _GetGoodDispatch
com_error: (-2147221005, 'Invalid class string', None, None)
That's odd. Were you trying to create the Out Format imp1 or imp2?

If not, perhaps you could install the eBook Publisher software (Download latest (free) version of eBook Publisher) as this was previously required to generate .prc until I revised it in v1.8.2 to use instead my modified version of MobiPerl's html2mobi.exe.

Can you post a screenshot of the PDFRead GUI screen you used to generate this? (on Windows, just 'alt-Print Scrn' and paste into MS Paint, save it and upload it here as an attachment.)

Last edited by nrapallo; 05-12-2009 at 11:59 AM.
nrapallo is offline   Reply With Quote
Old 05-12-2009, 05:59 PM   #15
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
I can convert it to prc now but I only can see one page of the prc file.
Do not know why.
alxwang is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Books - Restoring Confirm to remove books Caffey Calibre 6 09-20-2010 09:23 AM
[Kobo] Remove page number from right-hand margin + justification digital_steve Calibre 5 08-05-2010 11:24 PM
calibre ignore margin-top and margin-bottom bender Calibre 2 12-11-2009 06:58 AM
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 10:37 AM
Question: Can DR1000 remove the blank margin of PDF? alxwang iRex 7 05-16-2009 11:41 AM


All times are GMT -4. The time now is 08:44 PM.


MobileRead.com is a privately owned, operated and funded community.