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

Configurable barcode #2190

Open
8 tasks
ebruchez opened this issue Apr 21, 2015 · 1 comment
Open
8 tasks

Configurable barcode #2190

ebruchez opened this issue Apr 21, 2015 · 1 comment

Comments

@ebruchez
Copy link
Collaborator

The barcode feature is currently only supported with PDF templates. Also, the barcode only supports encoding the document id. This issue addresses the following improvements:

  • support the barcode in automatic PDF mode
  • configurable
    • value
    • position
    • orientation
    • size

Suggested properties:

  • oxf.fr.detail.pdf.barcode.value: XPath expression
  • oxf.fr.detail.pdf.barcode.position
    • something like top/right/bottom/left as in CSS?
    • in what units?
  • oxf.fr.detail.pdf.barcode.orientation: horizontal | vertical
  • oxf.fr.detail.pdf.barcode.scale: xs:double

We do have a barcode processor which can generate an image. This would have to be reworked a bit (there is a version 2.1 from 2010 available), and the image must be accessible from oxf:xhtml-to-pdf, either via an added <img> or via CSS.

Another option, which might be better: use iText to embed the barcode in both PDF modes.

Tasks:

  • evaluate if can use iText barcode in both modes
  • figure out where to run the XPath expression
    • must be in the context of the form data, so in XForms
    • probably output value as a hidden <span> in the HTML so it is accessible by the PDF processors
  • figure out how to hook up position, orientation and scale
    • maybe <span class="fr-barcode fr-barcode-vertical" style="left: 100px; bottom: 50px; width: 500px">
    • OR via iText
  • allow setting the text below the barcode as well
  • support for PDF template for consistency
  • doc
  • enable by default on at least one demo form (Enable barcode by default for demo purposes #1008)
  • remove old barcode processor if unused

+1 from customer

@avernet
Copy link
Collaborator

avernet commented Oct 27, 2022

+1 from customer to make the value encoded by the barcode configurable

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