Skip to content

Page::GetAttribute method

IGR_Get_Page_Attribute returns style or properties of an open page; see <page> under Structured XML for a full list of options.

Prototype

string GetAttribute(string name)
string GetAttribute(string name) throws IGRException;
def GetAttribute(self, name: string) -> string
std::wstring getAttribute(const std::wstring& name)

Parameters

name: string : Name of attribute to return.

Return value

string : String of the requested attribute.

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
using Hyland.DocumentFilters;

var api = new Hyland.DocumentFilters.Api();
api.Initialize("License Code", ".");

using var doc = api.GetExtractor("filename.doc");
doc.Open(OpenType.Paginated);

foreach (var page in doc.Pages)
{
    using (page)
    {
        var dpi = page.GetAttribute("SourceDpiX");
    }
}

Additional Information

In addition to the <page> styles and properties, you can use the following attribute names.

Name Description
FONTS A semicolon delimited list of fonts present on the current page.
FONT_MAPPINGS A semicolon delimited list of “OriginalName=MappedName” fonts on the current page.
DOCUMENT_FONTS A semicolon delimited list of fonts processed in the document, up to the point of the call.
DOCUMENT_FONT_MAPPINGS A semicolon delimited list of "OriginalName=MappedName" fonts processed in the document, up to the point of the call.
SOURCEWIDTH Width of source document if it is a raster image.
SOURCEHEIGHT Height of source document if it is a raster image.
OPTIONS Document options currently in effect.

Note To retrieve all fonts for a document, use DOCUMENT_FONTS or DOCUMENT_FONT_MAPPINGS after processing the last page of the document. These attributes are more efficient than using FONTS or FONT_MAPPINGS per page.