ASP.NET Barcode SDK Component

GetPDFBitmap

 

Get the specific PDF page to Bitmap object .
 

bool GetPDFBitmap(
 string strPDFfileName,
 int iPage,
 Bitmap bitmap
)

 

Parameter
strPDFfileName
the path of PDF file name.

iPage
the page number, the first page is zero.

bitmap
the Bitmap object.


Return Value
Return true if successful.
Return false if failed.

Example

   

C# Syntax
using System.Drawing;
using System.Drawing.Imaging;
using BarcodeWrapper;

BarcodeReader reader= new BarcodeReader();
reader.ScanWithoutRotation = true;
reader.TryHard = true;
reader.ScanMultiple = true;
int iMyWidth=0;
int iMyHeight=0;
Bitmap bitmap;

int iPageCount=reader.GetPDFPageCount(strinputpath1);
bool bResult=reader.GetPDFPage(strinputpath1, iPageNo, out iMyWidth, out iMyHeight);
int iScaledWidth = (int)(iMyWidth * 2.5);
int iScaledHeight = (int)(iMyHeight * 2.5);

bitmap = new Bitmap(iScaledWidth, iScaledHeight);
bool bresult =reader.GetPDFBitmap(strinputpath1, iPageNo, bitmap);
int count = reader.ReadBarcodeImage(bitmap, x, y, width, height);
string text = "" + count + " codes found<br><br>";

for (int i = 0; i < count; i++)
{
text += reader.GetBarcodeType(i) + " value:" + reader.GetBarcodeValue(i) + "<br>";
}