Closed Levanth closed 3 years ago
I test your problem at the next update. Do you have an example code?
I used ![local image](picture.png)
in the md file and my header content was:
contents: '<div style="text-align: right;">Header test <img src="test.png" width="48px" height="48px" /></div>'
It included the Pictures before, but after the update it won't include them into the pdf
+1 for this bug report.
I am also trying to convert a Markdown with images to PDF, but the images don't show up in the PDF as I want them to. The tables render beautifully, though. :)
Here's what I observed in trying to add images.
Code:
PDF:
I have made tests with following files.
Filenames with whitespaces and specialchars (escaped with <file name.png>
doesn´t work after the update, but this is markdown-it package related and I could not do here anything. Could you please send me an ZIP archive to reproduce your problems?
@irenemeanspeace HTML around markdown code does not work. #47
The main problem seems to be when there is a relative or absolute path used to point to the location of the image
![ImageInSameFolder](testPicture.jpg)
![ImageRelative](../Logo/testPicture.jpg)
![ImageAbsolute](c:\Data\Logo\testPicture.jpg)
Only the first one is working for me in the PDF, HTML or pictures. Relative and absolute are not shown. All of them are working fine in the makdown-preview-plus preview and the exported HTML from it.
The same also applies for the header.js file
contents: '<img src="testPicture.jpg" alt="Test Logo">'
contents: '<img src="../Logo/testPicture.jpg" alt="Test Logo">'
contents: '<img src="c:\Data\Logo\testPicture.jpg" alt="Test Logo">'
For the header.js file the image must exist in the same folder: c:\Users\username.atom\markdown-themeable-pdf
Ok, I will test it again. You are on a windows machine?
@cakebake thanks for the update and response! I understand the issue about the html tags, guess there's no way around that.
However, is there a way to include the caption (the text inside the brackets) in the PDF?
I am on a windows machine, and the relative path seems to work for me. It should be ./Logo/testPicture.jpg
(one dot) instead of ../Logo/testPicture.jpg
(two dots), then it works. @robotroll But yes still the absolute path doesn't seem to work.
@irenemeanspeace Thanks for the tip with the single dot. @cakebake Yes, I'm on a Windows machine.
@irenemeanspeace What do you exactly mean with
... is there a way to include the caption (the text inside the brackets) in the PDF
Do you mean the "alt="*"" Tag visible as image caption? Some Text placed under the image to describe it?
@cakebake Yup, usually the text within the brackets appears as a caption below the image
![caption](filename.jpg)
I second @IreneCrisologo 's motion for the captions below the image. Thanks for the great package. Arrived here because image was not being included in PDF and ... well, filename had a space. Erased the space and problem is solved.
This issue is also affecting me. Bit of a pain to have to keep all my images in the same directory as the markdown document. Any update on this?
I have this problem but have got around it by inserting html where I would use the markdown image syntax.
Hello, sorry, but I will no longer maintain the project.
It would be very good to find a new owner for this project, who will take care of updating and expanding the Atom package. A new version based on Chrome Headless has already been prepared in a feature branch.
Hello I trying to convert a Markdown with images into a PDF and also included an image in the header.js but it won't load the picture. The Text converts fine but no pictures. It worked till the last update...
I tried moving the pictures to the 'markdown-themeable-pdf' folder in .atom and in my project-folder everywhere they won't show up