Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

?print-pdf can't find local images #467

Closed
hwang63130 opened this issue Nov 9, 2023 · 6 comments
Closed

?print-pdf can't find local images #467

hwang63130 opened this issue Nov 9, 2023 · 6 comments

Comments

@hwang63130
Copy link

Not sure what's wrong. But here is an example example.md file.

When I trying to print the pdf via http://localhost:1948/example.md/?print-pdf, the image on the first page is correctly displayed while the local image on the second page is shown missing.

# page 1

![img](https://example.site/example-image.png)

---

# page 2

![img](local-image.png)

node version 20.9.0
reveal-md version 5.5.2

@vvscode
Copy link
Contributor

vvscode commented Nov 20, 2023

@hwang63130 can you attach some demo repository to check the issue?

@hwang63130
Copy link
Author

@vvscode Here is a very simple example with only 2 slides. The first slide contains an image linking to the reveal.js homepage, while the second pointing to the local page.

https://github.com/hwang63130/reveal-md-example

By running reveal-md presentation.md , images on both slides seem ok under the presentation mode.

But if I visit http://localhost:1948/presentation.md/?print-pdf/, it appears the link to the local image is broken.

@vvscode
Copy link
Contributor

vvscode commented Nov 20, 2023

It works fine for me
Screenshot 2023-11-20 at 17 51 19
reveal-md.pdf

[email protected]

@hwang63130
Copy link
Author

hwang63130 commented Nov 26, 2023

@vvscode Thanks for the response. But not sure what went wrong but I still get the same broken link on both of my Windows machines (one with Windows 10 and the other with fresh installed Windows 11/Node LTS/reveal-md). I don't have Linux/Mac machines in hand so I am not sure if it is a Windows-only issue.

image

@vvscode
Copy link
Contributor

vvscode commented Nov 26, 2023

Have you inspected the page? Please run build command and attach results here in archive, also what is the directory name for you? Are you using wsl?

@hwang63130
Copy link
Author

OK. I know what I did wrong. I have been using the url http://localhost:1948/presentation.md/?print-pdf instead of http://localhost:1948/presentation.md?print-pdf
When switching to the correct url, the local images is shown correctly.

Sorry for the stupid mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants