TTMSFNCWXBarcode Color and Image Questions

Been playing around with the WX Pack's regular barcode, and ran into two issues.

First, I don't see where I can change the color of the barcode bars? In the JS library, it says this is 'barcolor' but I don't see that as one of the available Settings elements? And I can't seem to find anywhere else that I can set it. There's also backgroundcolor, but the generated image is transparent so that one is less of an issue at the moment.

Second, my IDE code completion is somehow completely broken but I can't seem to figure out how I'm suppose to get the image from getBarcode() as a data URI? I can get it via JS using...

(img is declared as TTMSFNCBitmap)

  var base64str = img.FData;

Which works fine, but I'd have thought that TTMSFNCBitmap.SaveToBase64 or something like that would be a better approach? Also, what product documentation contains the details of TTMSFNCBitmap? Couldn't track that down either?

Other than those items, so far it works pretty great :+1: :slight_smile:

(one more thing... there's a "debugger" call set in WEBLib.TMSFNCWXBarcode.Consts.pas file for some reason? Mistakenly left over, or was this left deliberately...? I see there are a couple in the PDF code as well?)


It's not exposed yet. We'll add this to our list.

The functionality you are looking for is covered by TTMSFNCUtils.SaveBitmapToBase64.

It's part of TMS FNC Core but we don't have documentation on it at this time.

No, the debugger was not left there intentionally. Thank you for bringing this to our attention, we removed it and the next version will contain the changes.

Great, thanks for the quick response!

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.