Comments (4)
Can you please point to that part of documentation and also clarify what you mean? What format (Python object) do you have your table in?
There are examples in https://github.com/Edinburgh-Genome-Foundry/blabel/tree/master/examples for printing several items per page, reading from spreadsheet etc
from blabel.
Hello,
The documentation shows how to print two labels on one PDF as follows:
`from blabel import LabelWriter
label_writer = LabelWriter("item_template.html",
default_stylesheets=("style.css",))
records= [
dict(sample_id="s01", sample_name="Sample 1"),
dict(sample_id="s02", sample_name="Sample 2")
]
label_writer.write_labels(records, target='qrcode_and_label.pdf')`
My requirements are:
- Users go to a PHP page that interacts with a MYSQL database.
- On the page, they can filter a long list of items by ID number
- They could, for example, end up with a group of 6 items that share a common ID number
- Right now, my page has a button for each item that uses blabel to print a label for each item
- What I would like to do is have one button that prints all six lables (or whatever the item count is) on one PDF
from blabel.
I see the problem now. The package is designed around a fixed PDF page or label size as that's how label printers (or printers in general) operate. But you have variable number of items, which means different PDF sizes. As I mentioned, it's possible to print several items per page, or see this example: #6
And here is an example for working from tables (spreadsheet / dataframe): https://github.com/Edinburgh-Genome-Foundry/blabel/tree/c95052f562af44ef47e2ec5b220ffbb3b721659b/examples/labels_from_spreadsheet
Alternatively you can work directly with WeasyPrint or PDF Reports.
from blabel.
The printing from table/label is closest to what I need, so maybe I can use that. Thank you.
from blabel.
Related Issues (20)
- Python Blabel generate broken PDF file HOT 5
- Please help me setup blabel. HOT 8
- Help using Blabel HOT 2
- Help making a label with a "title" and "description HOT 1
- How to print multiple stickers in one row. HOT 2
- QR Code is too small to scan with web cam HOT 3
- Putting multiple elements into QR code HOT 4
- Adding UTF-8 support HOT 1
- Don't force an specific weasyprint version HOT 2
- blabel gives error with pyinstaller HOT 3
- module 'barcode' has no attribute 'get_barcode_class' HOT 2
- No Barcode when generating only one Label
- QR Codes are shifted!
- Remove
- How to create multiline label with name at the bottom HOT 5
- Unwanted margin on divs/labels HOT 2
- Issues printing labels with multiprocessing HOT 3
- Cairo library module not loading HOT 4
- help mimicking an Avery label HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blabel.