Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2020, 08:13 AM   #1
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 207
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
Question [PDF] Text to image: pdftocairo or pdftoppm?

Hello,

Calling the Poppler experts

As an easier way than trying to turn it into EPUB, a work-around to read a PDF on an e-reader is to simply turn each page that contains complicated layout into an image. I know it's not as nice as real text, it won't be flowable, but it could be good enough to read.

I see that Poppler offers two applications for this purpose: pdftocairo and pdftoppm.

I have a few questions:
  1. Which application do you recommend?
  2. Should pages be saved as JPG, PNG, or SVG?
  3. What settings should I use for an e-reader whose screen is 768x1024 pixels?
  4. How to crop pages and get rid of the circles on the sides (used by printers for adjustement?)?

Thank you.
Attached Thumbnails
Click image for larger version

Name:	10.jpg-1.jpg
Views:	126
Size:	14.9 KB
ID:	178849  
Shohreh is offline   Reply With Quote
Old 04-28-2020, 09:41 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There's already software that does this, splitting up pdf into reader screen sized images. k2pdfopt IIRC
kovidgoyal is offline   Reply With Quote
Advert
Old 04-28-2020, 10:30 AM   #3
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 207
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
Thanks for the tip.

Using the default settings, some parts were a lot better than Poppler, but unsurprisingly and just like Poppler, it has a hard time with tables and insets.

I'll go through the settings and see if it can do better.
Shohreh is offline   Reply With Quote
Old 04-29-2020, 02:37 PM   #4
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 207
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
Since, unlike Poppler, the Windows version of MuPDF is up to date, I'm giving mutool as try.

Unless I missed it, the only way to turn pages of a PDF into pictures is to a) split the file into individual PDF files (one page = one PDF), b) turn the PDF into a PNG, c) turn the PNG into a PDF, and then d) merge all the PDF files back into a single file.

1. For some reason, the 40KB PNG turns into a 2MB PDF:

#212 dpi, 768x1024
mutool draw -r 212 -w 768 -h 1024 -o 30.png input.pdf 30

#From 40KB to 2MB!
mutool draw -o 30.pdf 30.png

2. Is there a way to crop the pictures, as way to get rid of the borders?

Thank you.

--
Edit: Found it.

Code:
mutool convert -O compress -o 30.pdf 30.png
Attached Thumbnails
Click image for larger version

Name:	30.png
Views:	135
Size:	24.0 KB
ID:	178918  

Last edited by Shohreh; 04-29-2020 at 03:20 PM.
Shohreh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Image PDF to PDF with text or other ebook format. Memes PDF 7 05-01-2023 04:52 PM
Pdf to html without losing text over image MadTom Conversion 1 11-14-2013 09:41 AM
EPUB -> PDF: Image Rather Than Text claytoncarney Conversion 3 01-03-2013 12:15 PM
PDF virtual printer as text not image mowbray Amazon Kindle 7 02-05-2010 12:32 PM
PDF Image -> OCR -> text frikk Workshop 9 07-08-2009 07:21 PM


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


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