So you want to
"...know a possibility how to export a PDF, that has just blank space where the graphics should be? (And the other way round)"
Well, I don't know how to reach that point directly. But I know a detour with three backdoors which get you were you want:
First, the detour: Export to PDF just as normal. The result will be no blank space where the graphics should be. No, there will be a graphics where the graphics should be. And text plus vectors where text plus vectors should be...
Second, the first backdoor: Make sure you have a Ghostscript version v9.16 or newer installed. Then run:
gs -o onlytext.pdf -sDEVICE=pdfwrite -dFILTERIMAGE -dFILTERVECTOR input.pdf
-dFILTERIMAGEparameter will remove all raster images from your PDF. The
-dFILTERVECTOR param will remove all vector drawings or other line art from your PDF. What remains are all the textual components on all pages.
Third, the second backdoor: Use the same Ghostscript and run:
gs -o onlyimage.pdf -sDEVICE=pdfwrite -dFILTERTEXT -dFILTERVECTOR input.pdf
-dFILTERTEXTparameter will remove all text parts from your PDF. The
-dFILTERVECTOR param you're already familiar with.... What remains are the raster image components on all pages.
Fourth, the third backdoor: Again, run Ghostscript:
gs -o onlyvector.pdf -sDEVICE=pdfwrite -dFILTERTEXT -dFILTERIMAGE input.pdf
You guess what this does? What remains are only the vector components on all pages.
Of course, you could also use only one of the params to remove one of the element types from the PDF and retain the other two.
Here is an example document which I use to demo the options. Admittedly, the document wasn't created with LaTeX, so bear with me...
Screenshot of original PDF page containing "image", "vector" and "text" elements.
Running the following 6 commands will create all 6 possible variations of remaining contents:
gs -o noIMG.pdf -sDEVICE=pdfwrite -dFILTERIMAGE input.pdf
gs -o noTXT.pdf -sDEVICE=pdfwrite -dFILTERTEXT input.pdf
gs -o noVCTR.pdf -sDEVICE=pdfwrite -dFILTERVECTOR input.pdf
gs -o onlyTXT.pdf -sDEVICE=pdfwrite -dFILTERVECTOR -dFILTERIMAGE input.pdf
gs -o onlyIMG.pdf -sDEVICE=pdfwrite -dFILTERVECTOR -dFILTERTEXT input.pdf
gs -o onlyVCT.pdf -sDEVICE=pdfwrite -dFILTERIMAGE -dFILTERTEXT input.pdf
The following image illustrates the results:
Top row, from left: all "text" removed; all "images" removed; all "vectors" removed. Bottom row, from left: only "text" kept; only "images" kept; only "vectors" kept.