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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > Sample Code
  New Posts New Posts RSS Feed - Draw text under a barcode
  FAQ FAQ  Forum Search   Register Register  Login Login

Draw text under a barcode

 Post Reply Post Reply
Author
Message
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Topic: Draw text under a barcode
    Posted: 03 Feb 11 at 6:21PM
Here is some sample code in Delphi that lets you draw text underneath a barcode.

// Add the Helvetica standard font
QP.AddStandardFont(4);

// Get the width of the barcode with a bar width of 1 unit
BarcodeWidth := QP.GetBarcodeWidth(1, '12345', 1);

// Draw the barcode
QP.DrawBarcode(100, 500, BarcodeWidth, 100, '12345', 1, 0);

// Center the text
QP.SetTextAlign(1);

// Draw the text at 10pt
QP.SetTextSize(10);
QP.DrawText(100 + BarcodeWidth / 2, 500 - 200 - 5 -
QP.GetTextHeight, '12345');


Edited by Rowan - 07 Feb 11 at 8:15PM
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store