Class PDFNetInternalTools
Encapsulates the conversion of a single document from one format to another.
Inherited Members
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public sealed class PDFNetInternalTools
Constructors
PDFNetInternalTools()
Declaration
public PDFNetInternalTools()
Methods
ConfigureLogFromJsonString(string)
Attempt to configure the logging ssytem with a json configuration file.
Declaration
public static bool ConfigureLogFromJsonString(string config_string)
Parameters
Type | Name | Description |
---|---|---|
string | config_string | Configuration Data in json form |
Returns
Type | Description |
---|---|
bool | Indicates if the configuration was successful |
DisableLogBackend(PDFNetInternalToolsLogBackend)
Disable a particular log backend.
Declaration
public static void DisableLogBackend(PDFNetInternalToolsLogBackend backend)
Parameters
Type | Name | Description |
---|---|---|
PDFNetInternalToolsLogBackend | backend | The log backend to disable |
EnableLogBackend(PDFNetInternalToolsLogBackend)
Enable a particular log backend.
Declaration
public static bool EnableLogBackend(PDFNetInternalToolsLogBackend backend)
Parameters
Type | Name | Description |
---|---|---|
PDFNetInternalToolsLogBackend | backend | The log backend to enable |
Returns
Type | Description |
---|---|
bool | Returns true if the backend is available and functioning |
GetDefaultConfigFile()
Get the default configuration json file. You could then modify it and pass it into ConfigureLogFromJsonString.
Declaration
public static string GetDefaultConfigFile()
Returns
Type | Description |
---|---|
string | The json string representing the default log configuration |
GetPDFViewTileSummary()
Get a summary of the held tiles of all the know instances of PDFViewImplTiled.
Declaration
public static string GetPDFViewTileSummary()
Returns
Type | Description |
---|---|
string | The json string representing the tile summary |
IsLogSystemAvailable()
Find out whether the logging system is built into this particular binary.
Declaration
public static bool IsLogSystemAvailable()
Returns
Type | Description |
---|---|
bool | returns true if TRN_LOG_ENABLE is defined in core |
LogMessage(PDFNetInternalToolsLogLevel, string, string, int)
Log a message to a particular stream using the core logging routines.
Declaration
public static void LogMessage(PDFNetInternalToolsLogLevel threshold, string message, string filename, int line_number)
Parameters
Type | Name | Description |
---|---|---|
PDFNetInternalToolsLogLevel | threshold | the importance of this log message |
string | message | the message to be logged |
string | filename | the filename from which the log message originates |
int | line_number | the line number from which the log message originates |
LogStreamMessage(PDFNetInternalToolsLogLevel, string, string, string, int)
Log a message to a particular stream using the core logging routines.
Declaration
public static void LogStreamMessage(PDFNetInternalToolsLogLevel threshold, string stream, string message, string filename, int line_number)
Parameters
Type | Name | Description |
---|---|---|
PDFNetInternalToolsLogLevel | threshold | the importance of this log message |
string | stream | the name of the stream to which the message belongs (a category label) |
string | message | the message to be logged |
string | filename | the filename from which the log message originates |
int | line_number | the line number from which the log message originates |
RunUniversalConversionTests(string)
Run universal conversion tests on all the documents found in the given path.
Declaration
public static string RunUniversalConversionTests(string path_with_docs)
Parameters
Type | Name | Description |
---|---|---|
string | path_with_docs | The path to search within for documents to convert |
Returns
Type | Description |
---|---|
string | The json string representing the test results |
SetCutoffLogThreshold(PDFNetInternalToolsLogLevel)
set the global log cutoff. No log statements with a level less than this will pass.
Declaration
public static void SetCutoffLogThreshold(PDFNetInternalToolsLogLevel threshold)
Parameters
Type | Name | Description |
---|---|---|
PDFNetInternalToolsLogLevel | threshold | The threshold. Entries with a priority greater than or equal to this level will be logged |
SetDefaultLogThreshold(PDFNetInternalToolsLogLevel)
set the log level for streams that do not otherwise have their level set.
Declaration
public static void SetDefaultLogThreshold(PDFNetInternalToolsLogLevel threshold)
Parameters
Type | Name | Description |
---|---|---|
PDFNetInternalToolsLogLevel | threshold | Entries with a priority greater than or equal to this level will be logged |
SetLogFileName(string)
Set the filename to log to.
Declaration
public static bool SetLogFileName(string log_filename)
Parameters
Type | Name | Description |
---|---|---|
string | log_filename | the name of the file to log into |
Returns
Type | Description |
---|---|
bool | returns true we were able to open a log file successfully |
SetLogLocation(string, string)
Set the directory and filename to log to. If the directory does not exist, it will be created.
Declaration
public static bool SetLogLocation(string log_directory, string log_filename)
Parameters
Type | Name | Description |
---|---|---|
string | log_directory | the path of the directory to log into |
string | log_filename | the name of the file to log into |
Returns
Type | Description |
---|---|
bool | returns true we were able to open a log file successfully |
SetThresholdForLogStream(string, PDFNetInternalToolsLogLevel)
set the log level for some particular stream.
Declaration
public static void SetThresholdForLogStream(string stream_name, PDFNetInternalToolsLogLevel stream_threshold)
Parameters
Type | Name | Description |
---|---|---|
string | stream_name | the name of the stream you wish to configure |
PDFNetInternalToolsLogLevel | stream_threshold | the stream threshold. Entries with a priority greater than or equal to this level will be logged |