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

allow user provided jinja template renderer #317

Open
BaaridunNasr opened this issue Jul 4, 2024 · 8 comments
Open

allow user provided jinja template renderer #317

BaaridunNasr opened this issue Jul 4, 2024 · 8 comments

Comments

@BaaridunNasr
Copy link

Is there perhaps a way to maintain fixed row height for a table?

I am attempting to print 1 row per page (this is basically labels for items). In this case, if I match the row height and table container height, there will be 1 row per page.

@maharshivpatel
Copy link
Collaborator

@PhantomKunai what you are asking for is page break at row level ?

@BaaridunNasr
Copy link
Author

@maharshivpatel
You could say that. Ideally the goal is to be able to print labels for a list of items in a child table, and each item appears on one page. Right now I am unable to

  1. break after a row (or)
  2. set the row height such that it spans the page height and automatically page breaks as it works now

@maharshivpatel
Copy link
Collaborator

@PhantomKunai if you don't mind me asking why not design 1 label and print using list view ?

@BaaridunNasr
Copy link
Author

BaaridunNasr commented Jul 9, 2024

@maharshivpatel
Here I designed a label. And in here I am trying to print a child table as this will contain specific information pertaining to that item received ( example, inspection seal, date received and so on )

image

It seems counter productive to create a separate doc for each label and print from the list view.

We achieved this previously by using jinja to parse through tables and setting minimum and maximum dimensions for elements to fit each in one page.

@BaaridunNasr
Copy link
Author

Ideally, each number should be on one page. Generating 6 pages.

@maharshivpatel
Copy link
Collaborator

maybe, option to access per row data and interface for printing each row per document can work ?

@BaaridunNasr
Copy link
Author

Yes that would seem like a solution for this. However, I think really it must be possible to build some html components using jinja. As I understand it now, Jinja is mainly used only to pre-process data in Print Designer.

Perhaps some blocks which act as containers and placeholders to simply render some html using jinja within its position on the page.

@maharshivpatel
Copy link
Collaborator

yeah, already on my mind 😅. but will take some time.

@maharshivpatel maharshivpatel changed the title Fixed sizes for table allow user provided jinja renderer Jul 10, 2024
@maharshivpatel maharshivpatel changed the title allow user provided jinja renderer allow user provided jinja template renderer Jul 15, 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

No branches or pull requests

2 participants