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

WIP: a solution for multi label printing #3537

Closed
wants to merge 1 commit into from

Conversation

nwns
Copy link
Contributor

@nwns nwns commented Aug 14, 2022

A hack and slash solution to multi-label printing (note that this is against stable not master, though it looks like it will auto merge against master as well).

A proposed fix for #3528

TODO:

  • Determine how this affects the plugin system. Will require understanding what the plugin system is accomplishing in the first place.
  • Template debug mode is ignored. Labels are always rendered as pdf.
  • PDF inline is ignored. File is always downloaded.

A, likely breaking, refactor of the label templates would probably be required to clean this up.

@matmair
Copy link
Member

matmair commented Aug 14, 2022

While I applaude the effort this breaks nearly every feature of labels and sets us back a year in that area. @SchrodingersGat any insights into reports/how that could be done while keeping the current featureset?

@nwns
Copy link
Contributor Author

nwns commented Aug 14, 2022

@matmair I am not sure I follow how it breaks nearly everything?

There will be breaking changes for the templates themselves, but everything in the documentation should be possible how I proposed it.

Alternatively, assuming I understand what the BarcodePlugins are supposed to do, we always use the plugin path and convert every label to a png first, then using my new template, create the pdf for the user from the list of images as a single pdf document.

@SchrodingersGat
Copy link
Member

@nwns this is actually an issue with the weasyprint library we use for PDF generation. I've tracked it down to a known issue: Kozea/WeasyPrint#1517

I'll pin the library to a version that works and that will address the issue.

@nwns
Copy link
Contributor Author

nwns commented Aug 15, 2022

@SchrodingersGat awesome. Downgrading weasyprint fixed it for me.

@SchrodingersGat
Copy link
Member

Good to hear!

@nwns nwns deleted the fix/multilabel branch August 15, 2022 04:48
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.

3 participants