frappe / print_designer

Visual print designer for Frappe / ERPNext
GNU Affero General Public License v3.0
238 stars 124 forks source link

allow user provided jinja template renderer #317

Open BaaridunNasr opened 5 months ago

BaaridunNasr commented 5 months ago

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 commented 4 months ago

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

BaaridunNasr commented 4 months ago

@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 commented 4 months ago

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

BaaridunNasr commented 4 months ago

@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 commented 4 months ago

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

maharshivpatel commented 4 months ago

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

BaaridunNasr commented 4 months ago

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 commented 4 months ago

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