C# Class PdfRpt.Core.Helper.PdfImageHelper

iTextSharp.text.Image class utilities
Exibir arquivo Open project: VahidN/PdfReport

Public Methods

Method Description
GetBarcodeImage ( this barcode, string barcodeText, PdfContentByte cb ) : Image

Converts the barcodeText to a barcode image and then returns an instance of iTextSharp.text.Image

GetITextSharpImageFromAcroForm ( this pdfWriter, string pdfTemplateFilePath, IList data, Action onFillAcroForm, IList fonts, int pageNumber = 1 ) : Image

Fills an AcroForm automatically and then Converts the selected page number of an existing pdf template file to an instance of iTextSharp.text.Image

GetITextSharpImageFromByteArray ( this data, bool cacheImages = true ) : Image

Converts an array of bytes/blobs of an image file to an instance of iTextSharp.text.Image

GetITextSharpImageFromImageFile ( this imageFilePath, bool cacheImages = true ) : Image

Gets an image's file path and returns an instance of iTextSharp.text.Image

GetITextSharpImageFromPdfTemplate ( this pdfWriter, string pdfTemplateFilePath, int pageNumber = 1 ) : Image

Converts the selected page number of an existing pdf template file to an instance of iTextSharp.text.Image

Private Methods

Method Description
checkImage ( this img ) : Image

Method Details

GetBarcodeImage() public static method

Converts the barcodeText to a barcode image and then returns an instance of iTextSharp.text.Image
public static GetBarcodeImage ( this barcode, string barcodeText, PdfContentByte cb ) : Image
barcode this Barcode type defined in the iTextSharp.text.pdf namespace
barcodeText string Text to convert
cb iTextSharp.text.pdf.PdfContentByte Canvas
return iTextSharp.text.Image

GetITextSharpImageFromAcroForm() public static method

Fills an AcroForm automatically and then Converts the selected page number of an existing pdf template file to an instance of iTextSharp.text.Image
public static GetITextSharpImageFromAcroForm ( this pdfWriter, string pdfTemplateFilePath, IList data, Action onFillAcroForm, IList fonts, int pageNumber = 1 ) : Image
pdfWriter this PdfWriter object
pdfTemplateFilePath string pdf file path
data IList Row's data
onFillAcroForm Action FillAcroForm Formula
fonts IList Controls fonts
pageNumber int selected page number of an existing pdf template file
return iTextSharp.text.Image

GetITextSharpImageFromByteArray() public static method

Converts an array of bytes/blobs of an image file to an instance of iTextSharp.text.Image
public static GetITextSharpImageFromByteArray ( this data, bool cacheImages = true ) : Image
data this blob data
cacheImages bool If true, the image bytes will be added to the PDF only once, not per each new instance. Therefore the result won't be a bloated PDF file. Choose this option if there are many similar images in your data source.
return iTextSharp.text.Image

GetITextSharpImageFromImageFile() public static method

Gets an image's file path and returns an instance of iTextSharp.text.Image
public static GetITextSharpImageFromImageFile ( this imageFilePath, bool cacheImages = true ) : Image
imageFilePath this Image's file path
cacheImages bool If true, the image bytes will be added to the PDF only once, not per each new instance. Therefore the result won't be a bloated PDF file. Choose this option if there are many similar images in your data source.
return iTextSharp.text.Image

GetITextSharpImageFromPdfTemplate() public static method

Converts the selected page number of an existing pdf template file to an instance of iTextSharp.text.Image
public static GetITextSharpImageFromPdfTemplate ( this pdfWriter, string pdfTemplateFilePath, int pageNumber = 1 ) : Image
pdfWriter this PdfWriter object
pdfTemplateFilePath string pdf file path
pageNumber int selected page number of an existing pdf template file
return iTextSharp.text.Image