Print Page | Close Window

Updating barcodes from Form Fields

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2263
Printed Date: 18 Jun 24 at 12:50PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Updating barcodes from Form Fields
Posted By: DarrellS
Subject: Updating barcodes from Form Fields
Date Posted: 14 May 12 at 5:45PM
I was wondering if anyone is familiar with a way to update a forms barcode based on information that is entered in a field on a PDF.

None of the barcoding commands seem to have a field name associated with them, so I am assuming that there is no way to update those interactively as someone completes a form. The only thing I have been able to think of is to use a barcode font and create field on the PDF that can not be edited and uses the barcode font for display and use the change event on the necessary field and add the necessary start and stop characters and a check digit. I was just wondering if anyone knew of a more "elegant" solution.

Thank You



Replies:
Posted By: DarrellS
Date Posted: 14 May 12 at 6:16PM
Looking at things a little closer, I don't know if the solution I proposed will work or not. Is there no function to get the name of a form field after you create it? I think that would be necessary to update it's value from an action on another form field.



Posted By: DarrellS
Date Posted: 14 May 12 at 6:18PM
Nevermind the second post. I am assuming it uses the name used in the "NewFormField" call.


Posted By: Ingo
Date Posted: 14 May 12 at 10:21PM
Hi Darrell!

I don't really understand what your looking for.
QuickPDF offers these formfield-functionalities:
http://www.quickpdflibrary.com/help/quickpdf/FormFields.php
It's possible to check if there are formfields on a page with FormFieldCount.
Then you can create a loop running through the formfields, getting the names, changing the contents if you want, ...
But as far as i know there's no functionality to keep a barcode in a formfield.
You can draw this barcode on a specific place on the page based on a specific formfield content.
If this formfield content will change you can overwrite the specific place on the page with white color (for example) and redraw a new barcode on the same place.

Cheers and welcome here,
Ingo



Posted By: DarrellS
Date Posted: 14 May 12 at 11:19PM
What I want to have is a field named EMPNO that would be a text field for someone to enter an employee number and then another field BCEMPNO that displays that employee number as a barcode with an asterisk and EMP added to the fron and a check digit and an asterisk added to the end. The field font for the barcode text field would be a barcode font and it would be read only. The value would only be updated by the script whenever the value of the EMPNO field changes.

I have tested giving both the barcode field and the text field the same name and this will give me a barcode of just what is typed into EMPNO, but then I do not have the start and stop characters.

I am trying to get some javascript to work but I am evidently missing something. If I create a PDF with javascript added to the validate event and then open the PDF in Adobe LiveCycle, it shows the script but it is sandwiched between /* */ so it is ignored.


Posted By: Ingo
Date Posted: 15 May 12 at 6:42AM
Hi Darrell!

As you can see here:
http://www.quickpdflibrary.com/help/quickpdf/DrawBarcode.php
You have to insert start- and stop-character by your own 'cause
correct start- and stop-characters depends on the chosen barcodetype.
The other most important thing is:
Never mix working on a pdf-form with adobe products and QuickPDF!
It WILL raise problems. Adobe doesn't like it if you're working on a
adobe-pdf-form with ANY third party tools.

Cheers, Ingo



Posted By: DarrellS
Date Posted: 15 May 12 at 1:45PM
I finally got the javascript working last night so I can take the two ID numbers on the form and add asterisks and a check digit as well as a couple of characters to identify which is which, so everything is working fine now.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk