How to pdf print multiple cards with fixed size? - flutter

How should I design a pdf in flutter that prints exactly sized i.e. on perforated paper.
My goal is a pdf with two columns and multiple rows. Inside the rows should be precisely positioned cards. The cards consist of images, QRCodes and tables generated from database data.
Should I use a pw.Stack or the pw.GridView or a pw.Table?
Where does positioning work best?

Related

Dynamic Row Height for DataTable in Flutter

I'm new to flutter.
I have a Datatable with data, but not all data is the same length, some are bigger than others. So my question is, can the height of the rows be made dynamic to fit the length of the data?
I know that there is a dataRowHeight property, but if I adjust it to show the longest data, the small ones have a very noticeable white space and it does not work for me.
you didn't share any code. but you can use expanded inside rows and columns.
Row(children:[Expanded(child: yourWidget),])

itextsharp spliting a row in multiple page (at Absolute position)

I'm in a situation where I need to split a (large) row into multiple page with ITextSharp.
My main difficulty is linked to the fact I need to put the table at position (x,y), so using WriteSelectedRows instead of Document.add().
In this case, SplitLate & SplitRows are useless.
If anyone knows how to split a row on multiple pages, you are more than welcome.

How can I set two sizes using Tableau tree map

A tree map can consist of the larger boxes and inside differing sizes of smaller boxes. Nothing I do in the shelf allows me to set two different measures sizes. I want my larger boxes to be proportional to my Total Population and the smaller boxes inside each to be proportional to my Utilization %. The three images I attached are my visualizations as well as one I found online that does exactly what I am trying to do.
In Tableau, you can only use one set of size per sheet.

iReport - Dynamic images or image height

having an issue with iReport/JasperReports and not sure the best way to tackle it. The report is a typical order detail style report with each line item enumerated with attributes like quantity, description, name, price, etc.
However, the problem I would like to solve revolves around displaying optional pictures as part of the line item description. Each line item could have N number of detailed pictures - think of it as multiple images of a product (like under the car hood, the wheels, interior, exterior, etc). The number of images is displayed at run time.
How can I include these dynamic images? I could create placeholders for 9 images, and hide if they aren't passed in, but that would leave blank space for the line items that don't have that many images. I could even combine all of the misc images into one bigger image before I passed to the report, but I still have the sizing issue.
Can't seem to figure out how to have dynamic sizing on the band, while still allowing multiple optional images.
Any ideas out there?
To solve your issue with blank space. You can set the band to not print when there is no data (would require 1 band for each picture/item. Or each component has a property 'Remove Line When Blank' which will compact the space if there is no data/images to show on that horizontal space.

Stretching a CrossTab's Cell Horizontally

How would I get a value cell [in a CrossTab widget] to stretch horizontally, rather than vertically? Stretch on overflow stretches the cell vertically, rather than horizontally.
Background
If I recall correctly, cells in JasperReports were neither designed nor implemented to stretch horizontally. This was a conscious decision made by the lead developers.
You can make them stretch by generating the cross-tab cells according to the width of the data (that sentence alone should give you a feel for the scope of creating a generic solution to this problem). It is possible, but would involve creating your own class using the JasperReports API.
Imagine you have 100,000 rows of data and want the cell to auto-fit to the longest string. JasperReports would have to do one of two things:
Generically modify the developer's SQL statement to query the longest string in each of the corresponding columns before running the final SQL statement. This effectively runs the query twice. If the query uses a volatile function call, then all sorts of problems can happen.
Query all the rows and then determine the longest string. For queries under 10,000 records, this is not a problem. Scaling up to 100,000 rows imparts a large performance hit, and would eat a fair chunk of RAM.
Then you have to answer questions about white space: trim or not to trim? If the reporting software trims it, then the data coming back isn't a true representation of the information in the database. If the data isn't trimmed, then that cascades to more problems (such as unexpectedly super-long columns that look "empty"). Or you can make it one more thing that the developer needs to do.
It is not a trivial problem.
Alternatives
Try DynamicJasper.