I know this question has been answered in other threads, but none of the solutions worked for me.
I have a pdf file which contains 4 plots with millions of colourful dots (Manhattan plots). The PDF file is so big (~100 MB) and I cannot even open it properly on my computer.
I have tried gs
and commands like
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -q -o output.pdf manhattan_plots_long.pdf
but it seems that it does not work and I get an error message which says "Unable to convert color space to sRGB, reverting strategy to LeaveColorUnchanged."
I could find another code which fixes this error, but the new PDF file has the same size!
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH \
-dAutoRotatePages=/None -dUseCIEColor -sOutputFile=output.pdf input.pdf
I do not understand what is wrong. Is there any solution for my problem?
-dPDFSETTINGS=/screen
?convert
tool?pdftk
or some other tool to extract single pages, and see if they render, so you can narrow down the problem. (2) Find another pdf with a simple image, make copy of your PDF, open copy in text editor that can handle large files (e.g. emacs), find the images and replace them with the simple image. Then fix xref table withpdftk
. You'll probably need some understanding of the PDF format to fix the problem, anyway, and this way you can get some idea how it looks like.