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

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 10-17-2018, 12:37 AM   #1
MarjaE
Guru
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 924
Karma: 53902736
Join Date: Jun 2015
Device: multiple
Remove background images from pdfs? perhaps all images?

Hi,

I have a few pdfs I can't read because background images obscure the text. I don't expect any solution for scanned pdfs, but I've tried to find one for pdf-born-pdfs, and been beset with bugs.

In Ghostscript, I've tried:

gs -sDEVICE=pdfwrite -dFILTERIMAGE -dFILTERVECTOR -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=[output.pdf] [input.pdf]

I don't just lose raster images and vector images, I lose about half the text too. And quick checks confirm it wasn't raster images of text.

I've also tried a 2-step process with:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=[output.pdf] [input.pdf]

*and then*

gs -sDEVICE=pdfwrite -dFILTERIMAGE -dFILTERVECTOR -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=[output.pdf] [input.pdf]

Now I lose about one-twentieth of the text instead of half, but that's still too much. I usually end up with the lower left corner of the page blown up to fill the whole page.

I've tried using mutool clean -d -l -g, or cpdf with specified page sizes (and -blacktext to avoid white text on white backgrounds), or ghostscript with specified page sizes, but none of these solve the problem.

Any suggestions?
MarjaE is offline   Reply With Quote
Old 10-17-2018, 08:22 AM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
PDFs can be put together a billion different ways.

Currently, there's no way that anyone can reproduce your issue.

Can you share this PDF or a sample of it, so people can test methods?

Can you at least show some sample images of what the PDF looks like?
Tex2002ans is offline   Reply With Quote
Old 10-17-2018, 03:30 PM   #3
MarjaE
Guru
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 924
Karma: 53902736
Join Date: Jun 2015
Device: multiple
The background images here don't give me any trouble, but the other bugs do occur:

https://www.chaosium.com/content/Fre...Quickstart.pdf

The background images on some Bundle of Holding pdfs have been making things unreadable, but I shouldn't share them.

Splitting individual pages actually helps with this-- at one point I was running cpdf to split, ghostscript to convert to 1.4, ghostscript again to remove images and vectors, cpdf to merge, and cpdf to blacktext. But using ghostscript again would cause some of the same errors to reappear.
MarjaE is offline   Reply With Quote
Reply

Tags
pdf, pdf processing

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing background images from pdf to epub maurelioc Conversion 6 03-30-2021 04:40 AM
Moon+ Reader - Delete background images lazorbeam Android Devices 2 02-01-2016 11:47 PM
Catalogue using background images roger64 ePub 7 06-10-2013 09:23 AM
dimensions and resolution of background images in epubs Derek R ePub 2 02-16-2012 04:44 PM
title page & background images Nate the great ePub 13 07-28-2009 04:38 PM


All times are GMT -4. The time now is 02:31 AM.


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