Page 1 of 1

Barcode Generator

Posted: Sat Oct 08, 2016 7:26 am
by JHPJHP

Re: Barcode Generator

Posted: Sun Oct 09, 2016 10:01 am
by JHPJHP
JHPJHP wrote:Either a generic message or "HTTP 400 Bad Request" error will show in the display area; I'll be replacing these with more uniform messages.
Updated:
- status and error messages
- code enhancements and bug fixes
- cosmetic changes

NB*: There may be additional messages that will be added in future updates.

Re: Barcode Generator

Posted: Mon Oct 10, 2016 3:58 pm
by JHPJHP
JHPJHP wrote:With the number of available barcodes, a database of options and text samples will be added at a later date.
Updated:
- added a database of barcode options and text samples to assist with applying the correct settings
- increased the Scaling option to 8
- applied the Scaling option to both Generating and Saving of barcodes

--------------------------------------------------------------

Updated:
- fixed a bug in the Barcode dropdown
- added additional message and error handling
- applied an optimization to the include file barcode.pbi
- applied some minor cosmetic changes

At one point the range for Scale X / Y was set between 1 - 20, but I recently lowered this to 1 - 8 due to Service Temporarily Unavailable messages when set to large. The error message would persist for a few minutes even at the lowest setting, but would eventually clear and accept requests again.

Re: Barcode Generator

Posted: Tue Oct 11, 2016 9:20 am
by JHPJHP
Updated:
- added an OSX version
-- Barcode_OSX.pb, barcode_OSX.pbi

------------------------------------------------

Updated:
- fixed a bug in the OSX example

NB*: Update also includes minor changes to the Windows version.

Re: Barcode Generator

Posted: Tue Oct 11, 2016 10:07 am
by RSBasic
Nice, thank you. Image

Re: Barcode Generator

Posted: Tue Oct 11, 2016 12:53 pm
by wilbert
#PB_MessageRequester_Warning is unknown on PB 5.42 for OSX.
If I remove that, I can run the app but I keep getting "ERROR: Service Unavailable" when I try to preview a barcode. :?

Re: Barcode Generator

Posted: Tue Oct 11, 2016 10:39 pm
by JHPJHP
Hi RSBasic,

Thank you for your comments.

-----------------------------------------------

Hi wilbert,

Thank you for testing the OSX version.

Please download the latest update to see if it solves the problem.
- you may need to remove #PB_MessageRequester_Warning

-----------------------------------------------

Updated:
- increased Scale X / Y max value to 20
- switched from HTTP/1.1 to HTTP/1.0
- moved the ButtonGadget scripts from a BindEvent to the main loop
- various other changes not worth mentioning

Scaling a barcode too large will either return a Time Out or Service Unavailable message.

NB*: Different barcodes may have a different Scale X/ Y threshold; what will work for one barcode may fail with another.

Re: Barcode Generator

Posted: Wed Oct 12, 2016 6:06 am
by wilbert
JHPJHP wrote:Please download the latest update to see if it solves the problem.
It's generating the barcodes now :)

Re: Barcode Generator

Posted: Wed Oct 12, 2016 2:36 pm
by JHPJHP
Hi wilbert,

Thank you for the confirmation.

I've added a small OSX update to remove the border around the barcode (WebGadget) DropDown:

Code: Select all

CocoaMessage(0, CocoaMessage(0, GadgetID(#WebGadget1), "enclosingScrollView"), "setBorderType:", #NSNoBorder)

Re: Barcode Generator

Posted: Wed Oct 12, 2016 3:23 pm
by wilbert
JHPJHP wrote:I've added a small OSX update to remove the border around the barcode (WebGadget) DropDown:

Code: Select all

CocoaMessage(0, CocoaMessage(0, GadgetID(#WebGadget1), "enclosingScrollView"), "setBorderType:", #NSNoBorder)
Seems to work fine :)

Re: Barcode Generator

Posted: Thu Apr 20, 2017 7:30 pm
by JHPJHP
Hi wilbert,

Thank you for testing the code.

-----------------------------------------------------------------------

Updated:
- added a Linux version to the first post (tested in Ubuntu 17.04 :: 64 bit)
- applied some minor bug fixes to all packages

NB*: If you haven't already done so, you will need to install the Linux packages located in Setup/install_files.sh.

Re: Barcode Generator

Posted: Tue May 28, 2019 4:58 am
by JHPJHP
Updated:
- API URL has changed

Additional information can be found here.

----------------------------------------------------------

Updated (Windows):
- image sizes configured to use the built-in PureBasic DPI compiler option

Re: Barcode Generator

Posted: Wed Jun 10, 2020 10:10 pm
by JHPJHP
Updated:
- added database script
- couple minor improvements
- fixed a few issues

Database Script
Script can be found in the database folder to download the barcode list, replacing the database file.

After some testing I noticed two barcodes that did not work; Data Matrix Rectangular Extension and Royal Mail Mailmark.

I compared the GET string from Barcode Generator with the online generator (bwip-js), and they were identical.

NB*: All three packages were updated; Windows, Linux, and OSX.

Image