Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Updating barcodes from Form Fields |
Post Reply |
Author | |
DarrellS
Beginner Joined: 14 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
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 |
|
DarrellS
Beginner Joined: 14 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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.
|
|
DarrellS
Beginner Joined: 14 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Nevermind the second post. I am assuming it uses the name used in the "NewFormField" call.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
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 |
|
DarrellS
Beginner Joined: 14 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
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 |
|
DarrellS
Beginner Joined: 14 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store