I am generating a graph with gnuplot and then, I need to crop a part of it as a pdf or high-quality image to be used with LaTeX.
I have tried generating the graph as a pdf and then cropping it but it cannot be transformed with tools that would serve for other pdfs. I can open it with Evince but not with Okular or Pdf-Shuffler. I have also tried with Krop and Briss without sucess. Pdfcrop returns the following error:
!!! Error: Cannot find PDF header of 'my_graph.pdf'
I can take a screenshot of the pdf but I can cannot save it as a pdf and if saved as an image, the quality is not good enough.
I have found an old pdf-shuffler error that refers to pdfs that contain only an image. I wonder if my problem is related because the pdf includes only the graph. However, this problem has been solved and was only related to export, while I am unable to import.
I am using Ubuntu 17.10.
Is there any tool I can use to crop a gnuplot-generated graph to pdf (or high-quality image)?
How is this pdf file different from others of the same format?