ContentElement Methods

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET

The ContentElement type exposes the following members.

Methods

  NameDescription
Public methodStatic memberCode exampleFromMarkup
Creates a collection of elements using given text as markup. The markup looks similar to XML markup, given that each element will have its Class property assigned to the name or a set of names of the enclosing tags. The resulting list will contain parsed content elements(mostly textblocks) with assigned classes. A markup element can contain the following attributes:
  • link, affects the Link property of the created element. If link destination starts with # then it will be considered as a CrossReference otherwise as a LinkUri. There is an additional attribute supported, href that works exactly the same.
  • Bookmark, affects the Bookmark property of the created element.
  • Id, affects the Id property of the created element, so it can be linked to.
  • elementType, sets the target content element type, currently supported values are: section, image. This attribute makes it possible to create sections containing other elements or define some of the elements as images.
A few tags have special meaning:
  • <img>, can be used for putting images, e.g. <img src='[path to file or resource id]' width='[image width][unit]' height='[image height][unit]'/> creates Image element entry. Unit can be omitted or can be one of the following: auto|pt|in|px|cm|%.
  • <br/>, creates Br element entry.
  • <div/>,<ol/>,<ul/>, create Section element entry.
Top
See Also

Reference