PdfFileStamp.AddHeader

AddHeader(FormattedText, float)

Adds header to the page.

public void AddHeader(FormattedText formattedText, float topMargin)
ParameterTypeDescription
formattedTextFormattedTextText for header and properties of the text.
topMarginSingleMargin on the top of page.

Examples

PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf");
fileStamp.AddHeader(new FormattedText("Head of the page"), 50);
fileStamp.Close();

See Also


AddHeader(FormattedText, float, float, float)

Adds header to the pages of file.

public void AddHeader(FormattedText formattedText, float topMargin, float leftMargin, 
    float rightMargin)
ParameterTypeDescription
formattedTextFormattedTextFormatted text object which contains page text and its properties.
topMarginSingleMargin on the top of the page.
leftMarginSingleMargin on the left of the page.
rightMarginSingleMargin on the right of the page.

Examples

PdfFileStamp stamp = new PdfFileStamp("input.pdf", "output.pdf");
stamp.AddHeader(new FormattedText("Head of the page"), 10, 50, 50);

See Also


AddHeader(string, float)

Adds image as header to the pages of the file.

public void AddHeader(string imageFile, float topMargin)
ParameterTypeDescription
imageFileStringPath to the image file.
topMarginSingleMargin at top of the page.

Examples

PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf");
Stream input = new FileStream(TestSettings.GetInputFile("test.jpg"), FileMode.Open, FileAccess.Read);
fileStamp.AddHeader("image.jpg", 50);
fileStamp.Close();

See Also


AddHeader(string, float, float, float)

Adds image as header on the pages.

public void AddHeader(string imageFile, float topMargin, float leftMargin, float rightMargin)
ParameterTypeDescription
imageFileStringPath to the image file.
topMarginSingleMargin at top of the page.
leftMarginSingleMargin at left side of the page.
rightMarginSingleMargin at right side of the page.

Examples

PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf");
Stream input = new FileStream(TestSettings.GetInputFile("test.jpg"), FileMode.Open, FileAccess.Read);
fileStamp.AddHeader("image.jpg", 50, 100, 100);
fileStamp.Close();

See Also


AddHeader(Stream, float)

Adds image as header on the pages.

public void AddHeader(Stream imageStream, float topMargin)
ParameterTypeDescription
imageStreamStreamStream of the image.
topMarginSingleMargin at top of the page.

Examples

PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf");
Stream input = new FileStream(TestSettings.GetInputFile("test.jpg"), FileMode.Open, FileAccess.Read);
fileStamp.AddHeader(new FileStream("image.jpg", FileMode.Open, FileAccess.Read), 50);
fileStamp.Close();

See Also


AddHeader(Stream, float, float, float)

Adds image at the top of the page.

public void AddHeader(Stream inputStream, float topMargin, float leftMargin, float rightMargin)
ParameterTypeDescription
inputStreamStreamStream which contains image data.
topMarginSingleMargin at top of the page.
leftMarginSingleMargin at left side of the page.
rightMarginSingleMargin at right side of the page.

Examples

PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf");
Stream input = new FileStream(TestSettings.GetInputFile("test.jpg"), FileMode.Open, FileAccess.Read);
fileStamp.AddHeader(new FileStream("image.jpg", FileMode.Open, FileAccess.Read), 50, 100, 100);
fileStamp.Close();

See Also