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

PDF not being rendered with background image #54

Closed
spkane opened this issue Dec 6, 2018 · 2 comments
Closed

PDF not being rendered with background image #54

spkane opened this issue Dec 6, 2018 · 2 comments

Comments

@spkane
Copy link

spkane commented Dec 6, 2018

I am using marp-cli via the Docker container and although it is working in general, the PDF files are not being rendered with the background image in my custom theme, although it works fine in the HTML.

Should this work and do you have any ideas or pointers on how I could troubleshoot this?

Here are some details about the setup and workflow...

On a Mac OS X system in a directory with the following files:

class-docker-compose.md
images/chalkboard-16by9.jpg
sunburst.css
spkane.css

I am running the following commands:

docker pull marpteam/marp-cli
docker run --rm -v $PWD:/home/marp/app/ marpteam/marp-cli class-*.md --theme-set spkane.css
docker run --rm -v $PWD:/home/marp/app/ marpteam/marp-cli class-*.md --theme-set spkane.css --pdf
@yhatt
Copy link
Member

yhatt commented Dec 6, 2018

@spkane Please try --allow-local-files option. PDF conversion in Marp CLI cannot use local file resources by default because of the security reason.

docker run --rm -v $PWD:/home/marp/app/ marpteam/marp-cli class-*.md --theme-set spkane.css --pdf --allow-local-files

Working to write the documentation that included this tip is now in progress.

@spkane
Copy link
Author

spkane commented Dec 6, 2018

That did the trick. Thank you very much. I pretty sure that the directions and option in help weren't there when I started working on this, but I am really glad to see the progress.

I know that this is still heavily in development, but it has been very helpful! Thank you for all the hard work!!

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