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

Add feature to directly consume self-generated xslfo content supplied through params. #5

Closed
wants to merge 2 commits into from

Conversation

pulkit604
Copy link
Contributor

@pulkit604 pulkit604 commented Jul 15, 2024

Directly consume self-generated xslfo content supplied through params.

Sample code:

import pypfop
import pypfop.templates.mako

tfactory = pypfop.templates.mako.Factory()
doc_gen = pypfop.DocumentGenerator(template=tfactory("dummy.mako"))
xslfo = open("test.fo", "rb").read()
fpath = doc_gen.generate(params={"xslfo": xslfo}, out_format="pdf")

@cyraxjoe
Copy link
Owner

What's the benefit of using this library if you skip all the templating? If you only want to wrap the subprocess or http request call you can use the builders directly https://github.com/cyraxjoe/pypfop/blob/master/pypfop/builder.py#L31

@pulkit604
Copy link
Contributor Author

Thanks! This is exactly what I needed.

@pulkit604 pulkit604 closed this Jul 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants