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 - Bar code with text surrounded by code.
  FAQ FAQ  Forum Search   Register Register  Login Login

Bar code with text surrounded by code.

 Post Reply Post Reply
Author
Message
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Topic: Bar code with text surrounded by code.
    Posted: 17 May 14 at 10:12AM
Below is example how to draw Bar code with text surrounded by code. (script in AutoIt)
; ----------------------------------------------------------------------------------------------------------------
$oQP.SetOrigin($__QPDF_SORIGIN_TopLeft);
$oQP.SetMeasurementUnits($__QPDF_MUNITS_Milimeters)

; Get the width of the barcode With a bar width of 0,1 mm
Local $iBarcodeWidth = $oQP.GetBarcodeWidth(0.1, $sText, 1);

; Draw the barcode
$oQP.DrawBarcode($iBarcodeLeft, $iBarcodeTop, $iBarcodeWidth, $iBarcodeHeight, $sText, 1, 0);

$oQP.SetTextSize(11);
Local $iTextWidth = $oQP.GetTextWidth($sText)
Local $iTextHeight = $oQP.GetTextHeight()
$oQP.SetFillColor(1, 1, 1);
; Draw White Box
$oQP.DrawBox($iBarcodeLeft + ($iBarcodeWidth - $iTextWidth) / 2, $iBarcodeTop + $iBarcodeHeight - $iTextHeight, $iTextWidth, $iTextHeight, 1)

; Center the text
$oQP.SetTextAlign($__QPDF_TEXTALIGN_Center);

; Draw the text
$oQP.SetTextSize(10);
$oQP.DrawText($iBarcodeLeft + $iBarcodeWidth / 2, $iBarcodeTop + $iBarcodeHeight, $sText);
; ----------------------------------------------------------------------------------------------------------------
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