Click or drag to resize

PDFNet Class

PDFNet contains global library initialization, registration, configuration, and termination methods. There is only a single, static instance of PDFNet class. Initialization and termination methods need to be called only once per application session.
Inheritance Hierarchy
SystemObject
  pdftronPDFNet

Namespace:  pdftron
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class PDFNet

The PDFNet type exposes the following members.

Constructors
  NameDescription
Public methodPDFNet
Initializes a new instance of the PDFNet class
Top
Methods
  NameDescription
Public methodStatic memberCode exampleAddFontSubst(String, String)
AddFontSubst functions can be used to create font substitutes that can override default PDFNet font selection algorithm. These functions are useful in situations where referenced fonts are not present in the document and PDFNet font substitution algorithm is not producing desired results. AddFontSubst(fontname, fontpath) maps the given font name (i.e. 'BaseFont' entry from the font dictionary) to a font file. AddFontSubst(ordering, fontpath) maps the given character ordering (see Ordering entry in CIDSystemInfo dictionary; Section 5.6.2 in PDF Reference) to a font file. This method is less specific that the former variant of AddFontSubst, and can be used to override a range of missing fonts (or any missing font) with a predefined substitute. The following is an example of using these functions to provide user defined font substitutes:
Public methodStatic memberAddFontSubst(CharacterOrdering, String)
Adds the font subst.
Public methodStatic memberAddResourceSearchPath
Adds a location for PDFNet to look for resources file.
Public methodStatic memberAreFontsAvailable
Gets whether or not fonts are available to be used. The first time PDFNet is initialized on a new system it will catalog all the fonts for future use. This will return true when all this is done.
Public methodStatic memberEnableJavaScript
A swtich that can be used to turn on/off JavaScript engine
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodStatic memberGetSystemFontListJSON
Returns a JSON entry with all the fonts that PDFNet has access to. Custom fonts can be added by providing a path to their directory via pdftron.PDFNet.AddResourceSearchPath Each entry consists of a file path, a display name, and a PDFTron name. For most fonts (C:/Windows/Fonts), the display name can be used in UI widgets. For fonts either downloaded or imported use the full path, but use ms-appdata:///local for the local folder and ms-appx:/// for the installed location, and append a # followed by the display name. For example, a font in the App's Assets folder called font.ttf, with display name Custom Font would be used in a UI wiget as follows: "ms-appx:///Assets/font.ttf#Custom Font" For all fonts, the PDFTron name is to be used for creating fonts used in the PDF
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberGetVersion
Gets the version number of PDFNet library.
Public methodStatic memberInitialize
Initializes PDFNet library in demo mode. Initialize() is usually called once, during process initialization.
Public methodStatic memberInitialize(String)
Initializes PDFNet library. Initialize() is usually called once, during process initialization.
Public methodStatic memberIsJavaScriptEnabled
Test whether JavaScript is enabled.
Public methodStatic memberSetColorManagement
Used to set a specific Color Management System (CMS) for use during color conversion operators, image rendering, etc.
Public methodStatic memberSetDefaultDeviceCMYKProfile
Sets the default ICC color profile for DeviceCMYK color space.
Public methodStatic memberSetDefaultDeviceRGBProfile
Sets the default ICC color profile for DeviceRGB color space.
Public methodStatic memberSetDefaultDiskCachingEnabled
Sets the default policy on using temporary files.
Public methodStatic memberSetDefaultFlateCompressionLevel
Sets the default compression leve l for Flate (ZLib).
Public methodStatic memberSetPersistentCachePath
Sets the location of persistent cache files
Public methodStatic memberSetResourcesPath
Sets the location of PDFNet resource file.
Public methodStatic memberSetTempPath
Adds the font substitutes based on the specified character ordering.
Public methodStatic memberSetViewerCache
Sets the default parameters for the viewer cache. Any subsequently opened documents will use these paramaters.
Public methodStatic memberTerminate
Terminates PDFNet library. Terminate() is usually called once, when the process is terminated.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also