ericpap
ericpap

Reputation: 2937

Font missing with Crystal Reports generated PDF

I have a Crystal Report 8.5 file, that I need to export to PDF.

That report contains a field that I need to represent as Bar Code. To achieve that I use a TrueType font.

How can I assure that the codebar is visible on the PDF even if the computer doesn't have the font installed?

Upvotes: 4

Views: 8574

Answers (5)

Sun
Sun

Reputation: 2715

If you do not want to include a font, you can generate an image and call it via HTTP.

The barcode below is generated using an online barcode generator courtesy of WASP: http://www.waspbarcode.com/services/waspbarcode/barcodegen.ashx?symbology=Code128&code=font_missing_31301980

wasp font_missing_31301980

Steps for Report:

  1. Create blank JPG using MS Paint. Resize without aspect ratio checked on.
  2. Insert image placer holder such as 50x323 PNG into Crystal Report
  3. Right-click on graphic and select Format Graphic...

Format Graphic...

  1. Click on Picture tab, click on Formula, Enter Formula

Format Editor, Picture tab

  1. Create a formula where like the URL above. You want to retrieve the barcode data from the database and concatenate the prefix and barcode field together:

"http://www.waspbarcode.com/services/waspbarcode/barcodegen.ashx?symbology=Code128&code=" + {table.barcode_field}

report result

Take care to use your own online barcode generator. WASP service may not work if people starting abusing the service and generate too many barcodes for reports.

You can also generate Code 3 of 9 barcodes using HTML only, but I haven't tried in Crystal Report formula yet.

Upvotes: 3

Ajay2707
Ajay2707

Reputation: 5798

I had done this, so whenever you want the custom font style in crystal report, you have to install that font in server machine where your application host.

So if font is available, then report will map the font style and display as normal font.

There is one rule when you want other than standard font : as you installed font in your local machine to check pdf, the same process you will done on to the application server where your application are host or simply say the location (means server) / computer of your crystal report's physical files.

To show bar-code value in your crystal report, you just need to choose font in the format text of controls. Reports automatically display that, if it find the font, other wise gives error of font missing or not show properly bar-code section.

Upvotes: 0

RoastBeast
RoastBeast

Reputation: 1115

You must have the Bar Code font installed on the machine that is rendering the report if you are exporting to PDF because Crystal Reports does not embed fonts due to licensing issues.

However, you can print to a PDF printer, and select the option to embed the fonts into the file.

There are issues embedding fonts with 8.5 and SAP is not going to be very helpful as it is such an old version.

Upvotes: 0

Ankur Alankar Biswal
Ankur Alankar Biswal

Reputation: 1182

If you use a barcode image library, such as this barcode 3 of 9 image creating library for Crystal Reports, you will need not install font to each computers.

Upvotes: 0

Kurt Pfeifle
Kurt Pfeifle

Reputation: 90243

You have to embed the barcode font into the PDF!

Very likely the following has happened:

  1. The PDF is generated on a machine that (obviously) has the mentioned TrueType barcode font installed locally, but the barcode font isn't embedded into the PDF.
  2. Hence the same machine can still display that barcode correctly (because the font is available from the machine's local installation).
  3. The same barcode font is NOT installed on your $other machine.
  4. Hence $other machine cannot display that barcode correctly because it has to use a substitute font.

To rectify that situation, you have two options:

  1. Install that barcode font onto every single machine which will ever have to process, display or print that PDF. This is the worse alternative.
  2. Make your PDF generating software embed the barcode font into the PDF. Then you do not need to care about any machine that ever opens, displays, processes or prints the PDF. This is the better alternative!

Upvotes: 0

Related Questions