C# Class SharpPDFLabel.LabelCreator

Contains the labels/PDF creation logic
Show file Open project: wheelibin/SharpPDFLabel

Public Methods

Method Description
AddImage ( Stream img ) : void

Add an image to the labels Currently adds images and then text in that specific order

AddText ( string text, string fontName, int fontSize, bool embedFont = false ) : void

Add a chunk of text to the labels

CreatePDF ( ) : Stream

Create the PDF using the defined page size, label type and content provided Ensure you have added something first using either AddImage() or AddText()

LabelCreator ( SharpPDFLabel.Label label ) : System

Private Methods

Method Description
CopyStream ( Stream input, Stream output ) : void
CreateGapRow ( int numOfCols ) : PdfPRow

Method Details

AddImage() public method

Add an image to the labels Currently adds images and then text in that specific order
public AddImage ( Stream img ) : void
img Stream
return void

AddText() public method

Add a chunk of text to the labels
public AddText ( string text, string fontName, int fontSize, bool embedFont = false ) : void
text string The text to add e.g "I am on a label"
fontName string The name of the font e.g. "Verdana"
fontSize int The font size in points e.g. 12
embedFont bool If the font you are using may not be on the target machine, set this to true
return void

CreatePDF() public method

Create the PDF using the defined page size, label type and content provided Ensure you have added something first using either AddImage() or AddText()
public CreatePDF ( ) : Stream
return Stream

LabelCreator() public method

public LabelCreator ( SharpPDFLabel.Label label ) : System
label SharpPDFLabel.Label
return System