-
Notifications
You must be signed in to change notification settings - Fork 118
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
Custom HTML #11
Comments
Do you want to use local file path? |
Not local path. Instead of passing in URL, I wanted to pass in plain HTML directly? |
Could you give me an example? |
My use case is as follows: Let's say I have an HTML template called <html>
<div class="container">
<h1 class="title">
{{ title }}
</h1>
<h2 class="subtitle">
{{ subtitle }}
</h2>
</div>
</html> I want to use a templating engine like Jinja to pass in data to the template and generate the HTML <html>
<div class="container">
<h1 class="title">
Foo
</h1>
<h2 class="subtitle">
Bar
</h2>
</div>
</html> Using this generated HTML, I want to create an image or pdf. Is there a way to do this using Docton? |
You may upload your generated html to your http server where the uri can reach by Doctron. |
Doing this is tricky because Docton needs to fetch the HTML via a GET request. But passing in large amounts of data to an HTML template through a GET request is not easy/recommended. It would be really useful to have an enhancement to pass in an HTML string directly. But thanks for your help! |
Is it possible to pass in custom HTML as a parameter instead of pointing to a URL?
I want to generate a pdf from HTML templates (using Jinja/Nunjucks)
The text was updated successfully, but these errors were encountered: