I am looking for a process overview of the OMEKA Reports Plugin. We are attempting to customize the QR Code generator to output a PDF sized to the dimensions of our label printer, and include additional item metadata fields. By Default, PdfQrCode reports have the QR Code (via Google Charts) and the item title. We’d like to add “Creator”, “Item #” and “Location” next to the QR code as well. So two main goals:
- resize the PDF output to our label type (2” x 1”; Zebra Label Type 83259); link)
- Under Item Title, include item metadata fields “creator”, “id” & “location”
re: Resizing the PDF Output, Lines 57-79 seem the most relevant. We have been able to modfy these specifications and change the layout of items in PDF report. We will be tweaking it some more, but if anyone has already performed this size/layout modification and can share words of wisdom or even code, would be very grateful.
re: Adding Metadata Fields - I am poking around Report.php to add metadata elements to the reports query functionality - is this the right place to start?? (Report.php to make sure the relevant metadata elements are included with the query resuts). Then I am looking at PdfQrCode.php (lines 215-226) which I believe places the item title next to the QR code. I can duplicate this chunk, replacing $titles to $creators or something similar??
In terms of the Reports Plugin Process, from what I can tell it seems to go like this:
PdfQrCode.php loads Report.php and Generator.php.
Report.php queries the OMEKA database, returning public item metadata fields including $id; $name; $description; $query; $creator; $modified (lines 15-24, Report.php. If I wanted to include $Location, should I include “public $Location;” somewhere in this section?? (Lines 15-24; Report.php)??
PdfQrCode.php then ingests the query results from Report.php, and formats the PDF document and metadata fields - is this right?? In particular, it looks like Lines 215-226 of PdfQrCode.php places the item “title” next to the QR Code in the PDF. If I wanted to add additional metadata fields, should I duplicate Lines 215-226 and modify from $titles to $creator for example??
Export PDF FIle
Any insights to the overall Reports Plugin Process, as it relates to these .php files would be very helpful. I am digging through all the forum posts and legacy developer documentation in the meantime - hoping by posting here, I can quickly get directions from someone who has been here before and customized the Reports Plugin.
Jonathan Cachat, PhD