BarcodeTools.com
Professional BarCode Software
Home
Barcode ActiveX
DataMatrix ActiveX
PDF417 ActiveX
MaxiCode ActiveX
QRCode ActiveX
Barcode .NET
DataMatrix .NET
PDF417 .NET
Barcode ASP.NET
DataMatrix ASP.NET
PDF417 ASP.NET
ISAPI
CGI
LabelBar(Pro)
Console Apps
Barcode Recognition
Order
FAQs
Flash Tutorials
Support
Barcode Types
OnLine Barcode
Our barcode software compatible with Windows XP, 7, 8, 10

Home arrow PDF417 .NET arrow More Info arrow Methods
Methods Print E-mail


Barcodes.PDF417 Namespace

PDF417Control Class
Barcodes.PDF417.dll assembly
 
About Method
Returns an about information.

Syntax
string About()
Return Value
String that specifies an about information.



SaveToImageFile Method
Saves the image of the barcode to a file.

Syntax
ErrorCodes SaveToImageFile(double cx, double cy, string sFileName, 
int lRes, Dimensions dm)
Parameters
cxA double that defines the barcode picture width.
cyA double that defines the barcode picture height.
sFileNameA string expression defining the file name.
lResA integer value that sets the picture resolution.
dmThe Dimensions value. This value defines the units that should be used to specify cx and cy. See remarks.
Return Value
ErrorCodes
Remarks
The format the file will be saved in depends on the extension of the file name For example, if you specify sFileName as "img1.jpg", the barcode will be saved as JPEG.
The following extensions can be used - "wmf", "emf", "bmp", "jpg", "jpeg", "gif", "tiff" and "png".

If the size of an image (cx, cy) is not specified in pixels, its actual size will be calculated using the specified picture resolution - lRes.
Examples
/* 1.
Save the image to a file of the JPEG format. The size of the image will be 300x100 pixels.*/

pdF417Control1.SaveToImageFile( 200, 200, "c:\\PDF417.jpg", 0, Barcodes.PDF417.Dimensions.dmPixels );

/* 2.
Save the image to a file of the JPEG format. The size of the image will be 50x25 millimeters with the resolution of 300 dpi.*/

pdF417Control1.SaveToImageFile( 50, 25, "c:\\PDF417.jpg", 300, Barcodes.PDF417.Dimensions.dmMM ) ;

/* 3.
Calculate the required PDF417 size. See GetPDF417Size method.*/

double w, h;
pdF417Control1.GetMatrixSize( 2, 96, 96, Barcodes.PDF417.Dimensions.dmPixels, Barcodes.PDF417.Dimensions.dmPixels, out w, out h );
// Save the image to a file of the JPEG format. The PDF417 barcode will have the x-dimension of 2 pixels.
pdF417Control1.SaveToImageFile( w, h, "c:\\PDF417.jpg", 96, Barcodes.PDF417.Dimensions.dmPixels ) ;



DrawPDF417ToSize Method
Draws the PDF417 bar code in the device context or Graphics object. You can use either printer or screen.

Syntax
ErrorCodes DrawPDF417ToSize(double x, double y, double cx, double cy, Dimensions dm, IntPtr hDC)

ErrorCodes DrawPDF417ToSize(double x, double y, double cx, double cy, Dimensions dm, Graphics gr)

Parameters

XA double value that defines the X coordinate of the barcode.
YA double value that defines the Y coordinate of the barcode.
CXA double that defines the PDF417 width.
CYA double that defines the PDF417 height.
dmA Dimensions value. This value defines the units that should be used to specify cx and cy.
hDCThe handle of the device context where the barcode will be drawn.
grA Graphics object.

Return Value

ErrorCodes
Examples
// Draw a PDF417 to a screen.
Graphics gr = this.CreateGraphics();
pdF417Control1.DrawMatrixToSize( 0, 0, 400, 200, Barcodes.PDF417.Dimensions.dmPixels, gr );


// Print a PDF417
// The OnPrintBarcodePage event is raised for each page to be printed.
private void OnPrintBarcodePage(object sender, PrintPageEventArgs ev)
{
   double wMM, hMM;
   pdF417Control1.GetPDF417Size( 0.5, (int)ev.Graphics.DpiX, (int)ev.Graphics.DpiY,
      Barcodes.PDF417.Dimensions.dmMM, Barcodes.PDF417.Dimensions.dmMM, out wMM, out hMM );


   // print a PDF417 barcode to X=10 mm, Y=10 mm with X-Dimension=0.5 mm
   pdF417Control1.DrawMatrixToSize(10, 10, wMM, hMM, Barcodes.PDF417.Dimensions.dmMM,
      ev.Graphics );
}





CopyToClipboard Method
Copies the image of the barcode onto the clipboard. After that you can insert this image into your program using Ctrl+V or the Paste menu item.

Syntax
ErrorCodes CopyToClipboard(int cx, int cy)
Parameters
cxAn integer value that defines the barcode picture width
cyAn integer value that defines the barcode picture height
Return Value
ErrorCodes



GetPDF417Size Method
This method calculate the width and height that the PDF417 must have in order to get the necessary x-dimension.

Syntax
ErrorCodes GetPDF417Size(double lModule, int xRes, int yRes, Dimensions dmIn, Dimensions dmOut, out double width, out double height)

Parameters

lModuleThis double value that defines the necessary x-dimension.
xResA long value that defines the resolution (in dpi) along x axis.
yResA long value that defines the resolution (in dpi) along y axis.
dmInA Dimensions value. This value defines the units that should be used to specify lModule.
dmOutA Dimensions value. This value defines the units that should be used to specify the width.
widthReturns the necessary PDF417 width.
heightReturns the necessary PDF417 height.

Return Value

ErrorCodes
Example
double wMM, hMM;
pdF417Control1.GetPDF417Size( 0.5, (int)ev.Graphics.DpiX, (int)ev.Graphics.DpiY, Dimensions.dmMM, Dimensions.dmMM, out wMM, out hMM );



GetErrorMessage Method
Returns an information about error.

Syntax
string GetErrorMessage(ErrorCodes errCode)

Parameters

errCodeErrorCodes value.
Return Value
String that specifies an error information.



 

  Home   Order   FAQs   Support   Reader

Copyright © 1999-2016, RKD Software & RKD System Inc., All rights reserved.
All trademarks mentioned are the property of their respective owners.