Class PdfArtifact
- Namespace
- Syncfusion.Pdf
- Assembly
- Syncfusion.Pdf.Portable.dll
Artifacts in the PDF document can be graphic objects or other markings that are not a part of the authored content and will include things such as headers, footers, page numbers, watermarks, cut marks, color bars, background images, lines separating content, or decorative images.
public class PdfArtifact : PdfTag
- Inheritance
-
PdfArtifact
- Inherited Members
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact();
//Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout;
//Set the attachement for the artifact.
artifact.Attached = new PdfAttached(PdfEdge.Left);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact()
'Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout
'Set the attachement for the artifact.
artifact.Attached = New PdfAttached(PdfEdge.Left)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
Constructors
PdfArtifact()
Initialize the instance of PdfArtifact
public PdfArtifact()
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact();
//Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout;
//Set the attachement for the artifact.
artifact.Attached = new PdfAttached(PdfEdge.Left);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact()
'Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout
'Set the attachement for the artifact.
artifact.Attached = New PdfAttached(PdfEdge.Left)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
PdfArtifact(PdfArtifactType)
Initialize the instance of PdfArtifact
public PdfArtifact(PdfArtifactType type)
Parameters
type
PdfArtifactTypeType of the artifact
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact(PdfArtifactType.Layout);
//Set the attachement for the artifact.
artifact.Attached = new PdfAttached(PdfEdge.Left);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact(PdfArtifactType.Layout)
'Set the attachement for the artifact.
artifact.Attached = New PdfAttached(PdfEdge.Left)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
PdfArtifact(PdfArtifactType, RectangleF, PdfAttached, PdfArtifactSubType)
Initialize the instance of PdfArtifact
public PdfArtifact(PdfArtifactType type, RectangleF bBox, PdfAttached attached, PdfArtifactSubType subType)
Parameters
type
PdfArtifactTypeType of the artifact
bBox
RectangleFBounding box of the artifact
attached
PdfAttachedattachment for the artifact
subType
PdfArtifactSubTypeSubtype of the artifact
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact(PdfArtifactType.Layout, new RectangleF(0, 0, 100, 100), new PdfAttached(PdfEdge.Left), PdfArtifactSubType.Watermark);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact(PdfArtifactType.Layout, New RectangleF(0, 0, 100, 100), New PdfAttached(PdfEdge.Left), PdfArtifactSubType.Watermark)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
PdfArtifact(PdfArtifactType, PdfAttached)
Initialize the instance of PdfArtifact
public PdfArtifact(PdfArtifactType type, PdfAttached attached)
Parameters
type
PdfArtifactTypeType of the artifact
attached
PdfAttachedrepresents the attachment for artifact
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact(PdfArtifactType.Layout,new PdfAttached(PdfEdge.Left));
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact(PdfArtifactType.Layout, New PdfAttached(PdfEdge.Left))
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
PdfArtifact(PdfArtifactType, PdfAttached, PdfArtifactSubType)
Initialize the instance of PdfArtifact
public PdfArtifact(PdfArtifactType type, PdfAttached attached, PdfArtifactSubType subType)
Parameters
type
PdfArtifactTypeType of the artifact
attached
PdfAttachedattachment for artifact
subType
PdfArtifactSubTypeSubtype of the artifact
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact(PdfArtifactType.Layout, new PdfAttached(PdfEdge.Left), PdfArtifactSubType.Watermark);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact(PdfArtifactType.Layout, New PdfAttached(PdfEdge.Left), PdfArtifactSubType.Watermark)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
Properties
ArtifactType
Gets or sets the artifact type
public PdfArtifactType ArtifactType { get; set; }
Property Value
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact();
//Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout;
//Set the attachement for the artifact.
artifact.Attached = new PdfAttached(PdfEdge.Left);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact()
'Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout
'Set the attachement for the artifact.
artifact.Attached = New PdfAttached(PdfEdge.Left)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
Attached
Gets or sets the attachment for the artifact.
public PdfAttached Attached { get; set; }
Property Value
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact();
//Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout;
//Set the attachement for the artifact.
artifact.Attached = new PdfAttached(PdfEdge.Left);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact()
'Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout
'Set the attachement for the artifact.
artifact.Attached = New PdfAttached(PdfEdge.Left)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
BoundingBox
Gets or sets the bounding box for the artifact.
public RectangleF BoundingBox { get; set; }
Property Value
- RectangleF
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact();
//Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout;
//Set the attachement for the artifact.
artifact.Attached = new PdfAttached(PdfEdge.Left);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact()
'Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout
'Set the attachement for the artifact.
artifact.Attached = New PdfAttached(PdfEdge.Left)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also
SubType
Gets or sets the subtype of the artifact
public PdfArtifactSubType SubType { get; set; }
Property Value
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Set auto tag value.
document.AutoTag = true;
//Add new page to the document.
PdfPage page = document.Pages.Add();
//Create new instance for PDF artifact.
PdfArtifact artifact = new PdfArtifact();
//Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout;
//Set artifact subtype.
artifact.SubType = PdfArtifactSubType.Footer;
//Set the attachement for the artifact.
artifact.Attached = new PdfAttached(PdfEdge.Left);
//Set bounding box for the artifact.
artifact.BoundingBox = new RectangleF(0, 0, 100, 100);
//Create new instance for the PDF text element.
PdfTextElement element = new PdfTextElement(@"Syncfusion Essential studio tool");
//Set tag for the element.
element.PdfTag = artifact;
//Create new instance for the PDF font.
element.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 12);
//Create new instance for the PDF brush.
element.Brush = new PdfSolidBrush(new PdfColor(89, 89, 93));
//Draw text element on the PDF page.
element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));
//Save and close the document.
document.Save("Output.pdf");
document.Close(true);
'Create new document.
Dim document As PdfDocument = New PdfDocument()
'Set auto tag value.
document.AutoTag = True
'Add new page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create new instance for PDF artifact.
Dim artifact As PdfArtifact = New PdfArtifact()
'Set artifact type.
artifact.ArtifactType = PdfArtifactType.Layout
'Set artifact subtype.
artifact.SubType = PdfArtifactSubType.Footer
'Set the attachement for the artifact.
artifact.Attached = New PdfAttached(PdfEdge.Left)
'Set the bounding box for the artifact.
artifact.BoundingBox = New RectangleF(0, 0, 100, 100)
'Create new instance for the PDF text element.
Dim element As PdfTextElement = New PdfTextElement("Syncfusion Essential studio tool")
'Set tag for the element.
element.PdfTag = artifact
'Create new instance for the PDF font.
element.Font = New PdfStandardFont(PdfFontFamily.TimesRoman, 12)
'Create new instance for the PDF brush.
element.Brush = New PdfSolidBrush(New PdfColor(89, 89, 93))
'Draw text element on the PDF page.
element.Draw(page, New RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200))
'Save and close the document.
document.Save("Output.pdf")
document.Close(True)
- See Also