Closed stardiviner closed 3 years ago
Thank you for reporting the issue. Could you provide the link to the PDF that fails?
I solved this problem use pdftocairo command-line tool.
Could you provide the PDF that you got the issue?
I have already made pdfcairo version https://github.com/shg/org-inline-pdf.el/issues/1#issue-777389968 but I'd like to investigate the problem in detail.
Here is the my uploaded ebook file.
ec2b
@stardiviner Thank you very much but unfortunately it seems downloading is not allowed without a Baidu account. I will purchase the book from the publisher when necessary so you don't need to upload it again.
By the way, actually in my environment (macOS and Firefox or Safari) I can properly see the SVG you've uploaded below without any problem.
https://gist.github.com/d01056882c721f27ca27fcb4424b6b4c
What is your OS and which browser did you use to see the SVG when you encountered the issue?
Yes, I can open SVG image in Emacs image-mode too. But open with feh
or sxiv
is black. And inline display is also black. That what weird.
Is there other place I can upload PDF file? I can upload PDF again
@stardiviner The issue you reported is not directly related to this package so Iet me close this now.
By the way, as far as I checked feh
properly shows the SVG you uploaded, with an option --conversion-timeout 1
. It seems the problem you encounterd is probably not from pdf2svg but your configuration of the viewer commands. I am not sure but sxiv
may not even support SVG.
It seems that pdf2svg generates a slightly older version of SVG, but still it is a valid SVG, as far as I checked.
Thanks, the key point is not whether command-line image viewer like feh
or sxiv
can open this SVG image. The key point is Emacs can open svg file in image-mode
. But can't display svg file in buffer with inline image style. Anyway, let's close it now. Leave this problem away. 😄
OK I understand. Well actually I obtained the book's PDF to test this, and its cover page is displayed properly as an inline image with org-inline-pdf (the current version that calls pdf2svg). Tested both on Linux and macOS. There might be some differences between your and my environments. Thank you anyway for taking your time!
Could it be our implmentation is different? I'm using my written package https://github.com/stardiviner/org-link-beautify which inspired from your idea to preview PDF file. Thanks. 😸
So far I haven't reproduced the issue with org-inline-pdf
here. The book's PDF is correctly previewed in my environments. I haven't checked your code but I guess the issue is not in elisp but in the configuration of your environment for SVG handling.
Emacs uses Imagemagick internally for some graphics format conversion. The feh
command also does. You might want to check whether display
command shows the problematic SVG. If it doesn't you may need to fix it.
Hmm, interesting, I tested, only some PDF generated svg files can't viewed, but some can view.
I added similar feature to which inspired by your extension.
Here is my posted issue: https://github.com/dawbarton/pdf2svg/issues/32
Have you meet same problem?