1. MARKOVIC Marko
  2. PowerBuilder
  3. Friday, 7 October 2022 12:19 PM UTC

Hi,

Version 2021 Build 1506.

We have an issue when we want to print a datawindow with barcode: Code 128AB Short. The barcode is installed on every machine and it works when we print it on a pdf printer. Yes we have checked  packaging custom fonts

<=====   NativePDF

 <=====  PDF Printer or standard A4 Printer

 

PB Code:

dw_print.Modify ("DataWindow.Export.PDF.NativePDF.UsePrintSpec = Yes")
dw_print.Modify ("DataWindow.Export.PDF.Method = NativePDF!")
dw_print.Modify ("DataWindow.Export.PDF.NativePDF.PDFStandard = '1'")
dw_print.saveas( "C:\temp\test.pdf",PDF!,false)

 

Also tried to put in PB.ini NativePDF_IncludeCustomFont=1, same thing.

Some ideas or workaround???

 

Thanks.

 

 

Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 7 October 2022 13:43 PM UTC
  2. PowerBuilder
  3. # 1

Hi.

Don't know why you do have the issue in the start.

For packaging fonts in pdf, there is a note in help file: "the Font embeddability property of custom fonts must be set to non-restricted; if it is set to restricted, then custom fonts cannot be embedded to the PDF file"... So, not all fonts can be packaged...

Andreas.

Comment
There are no comments made yet.
MARKOVIC Marko Accepted Answer Pending Moderation
  1. Friday, 7 October 2022 14:45 PM UTC
  2. PowerBuilder
  3. # 2

Also if DataWindow.Export.PDF.NativePDF.PDFStandard = '0' , no restriction, it doesn't work.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 7 October 2022 17:45 PM UTC
  2. PowerBuilder
  3. # 3

Is this a TrueType font or an OpenType font?

Is this a publicly-available, downloadable font that others can experiment with? If so, please provide a URL to the download page.

Comment
  1. MARKOVIC Marko
  2. Friday, 7 October 2022 20:04 PM UTC
it is https://www.elfring.com/bar128.htm

but no freeware or trail i think

It is TrueType font.
  1. Helpful
  1. Mark Goldsmith
  2. Saturday, 8 October 2022 12:51 PM UTC
When you say "The barcode is installed on every machine...", do you mean that you have installed just the font set on each machine? Or do you mean that you have also purchased the embeddable version too which licenses you to include these fonts in a PDF? Assuming you've only done the former, I would note the last bullet point on the web page link you provided as well as take a look at this link: https://www.elfring.com/embed-font-pdf.htm

HTH...regards,

Mark
  1. Helpful 1
  1. MARKOVIC Marko
  2. Monday, 10 October 2022 06:50 AM UTC
The font set is only installed no emeddable version.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 10 October 2022 03:16 AM UTC
  2. PowerBuilder
  3. # 4

I'm curious why you are using a costly proprietary font (and software), when there are openly distributable Code 128 TrueType fonts available for no cost?

Is it to use the software that provides the "encoding" functionality that translates the data characters (numeric and/or ASCII-127) to the code points within the font?

In your original post, for example, the "{" translates into the encoded "Start A" barcode font character, followed by the encoded barcode fonts characters for "9" and then seven "0"'s, then the checksum character (the checksum is decimal 70 in your posted example, according to the barcode), then the "Stop" barcode font character.

I've been working on an example PB program that can generate several types of one-dimensional barcodes using global functions to encode the information for use with some free TrueType barcode fonts. Since the encoding and checksum calculations are performed in global functions, the barcodes can be generated and displayed in DataWindows and the barcodes are rendered when the DW is saved as a PDF using NativePDF. No third-party software is needed to transform the data into barcode form when using the same free TrueType fonts I have used. Here's an example of Code 128 barcodes from my example application:

I will be (soon, I hope) submitting the example program to CodeXchange and I'm writing a Tech Article to explain how the encoding and checksum calculations are performed. Unfortunately, I experienced some serious and unexpected eye/vision issues recently which forced me to set this work aside for a while, but thankfully, things are slowly improving so I hope I can pick up where I left off and publish this work soon.

If you are interested, I can provide you with the program and article in its current form. If I knew more about the details of the barcode encoding and generation you are wanting to do, it would help me determine if what I have to offer may help you.

Best regards, John

Comment
  1. John Fauss
  2. Thursday, 13 October 2022 16:39 PM UTC
Last night I had a little spare time, so I adapted the general-purpose Code 128 barcode encoding, checksum, and valid input functions I've previously coded to perform Code 128 barcode encoding using only Table A encoding. It's been three days since I supplied you with an email address you can use to contact me in order that I can make my example app and unfinished tutorial available to you, but I have not yet received anything. You are not obligated to do so, of course, but it sounded like you're interested and I'm still willing to try and help.
  1. Helpful
  1. MARKOVIC Marko
  2. Wednesday, 16 November 2022 13:15 PM UTC
sorry I don't have seen your replies yet. Of course thank you a lot if you can provide me help to progress :) I just have sent you an email.
  1. Helpful
  1. John Fauss
  2. Wednesday, 16 November 2022 15:14 PM UTC
A reply to your email containing a preliminary copy of my example application and tutorial document has been sent to you.
  1. Helpful 2
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.