Closed mattiasdrp closed 2 years ago
Sorry for not responding earlier. In my environment, both #+ATTR_HTML and #+ATTR_ORG work as expected. Based on the fact that the logo PDF is properly shown, I suspect the PDF you have generated with LaTex might be the cause. Could you post ab.pdf here?
Sure, here it is (you can generate it with the LaTeX code I provided above)
I don't see any issue with the PDF. It is shown properly here, with or without the width attribute setting. What happens if you place the the svg file mannually converted from the PDF instead?
I have the same error when importing the svg
Org version : Org mode version 9.4.6 (9.4.6-798-g738759.dirty-elpaplus @ /home/mattias/.emacs.d/elpa/org-plus-contrib-20210929/)
Ok, so the SVG converted from the PDF made with LaTeX does not work but the SVG converted from the logo PDF works, correct? Could you check whether the two SVG files are shown inline without loading org-inline-pdf? Inline displaying of SVG is done by Emacs itself.
The SVG from the logo is displayed whereas ab.svg is displayed as a white rectangle.
So the issue is outside of org-inline-mode software. You need to figure out why your Emacs is not displaying the SVG converted from the LaTeX file. Once you fix it, org-inline-pdf will work as well.
One thing you may want check is whether your Emacs shows SVG converted using pdftocairo instead of pdf2svg. You can install the command by installing poppler-utils (Debian/Ubuntu) or poppler (homebrew).
I generated a pdf file with LaTeX:
The PDF file is ok, I can convert it to SVG with pdf2svg but in org it just appears as a big white rectangle (whereas another pdf file like the github logo is fine):
But