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

Create single page pdf for thermal printer #2147

Closed
erlipsa opened this issue May 3, 2024 · 2 comments
Closed

Create single page pdf for thermal printer #2147

erlipsa opened this issue May 3, 2024 · 2 comments

Comments

@erlipsa
Copy link

erlipsa commented May 3, 2024

Hello,
I want create single page content pdf for directly print using thermal printer.
Here, my print design is
invoice_print_html.docx

Please provide all available solutions in your response.

@liZe
Copy link
Member

liZe commented May 3, 2024

Hi @erlipsa,

We use GitHub issues to track bugs, not to ask for support for HTML/CSS design.

If you want some community help about a specific design, you can ask on forums such as StackOverflow, or read some documentation about CSS on MDN for example. You can also study WeasyPrint’s samples. There are plenty of resources online to learn how to design documents with HTML and CSS!

We, at Courtbouillon, also provide professional support if you want to delegate the creation of your documents.

@liZe liZe closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
@patbengr
Copy link

patbengr commented Jun 1, 2024

This issue doesn't relate to HTML/CSS design. CSS @page rule, does not support dynamic page sizing. While CSS @page does allow specific page size declarations, it doesn't offer dynamic height adjustments.

WeasyPrint lacks support for dynamic page height adjustments. Similarly, alternatives like wkhtmltopdf also do not provide this feature.
The current workarounds involve setting a large fixed height and cropping the excess, or attempting to calculate the height based on invoice items, which may not always yield accurate results.

I think it can be implemented in WeasyPrint but it will need changes in the python code.

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

3 participants