Show / Hide Table of Contents

Class PDFNetInternalTools

Encapsulates the conversion of a single document from one format to another.

Inheritance
System.Object
PDFNetInternalTools
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: pdftron.PDF
Assembly: PDFNetAndroid.dll
Syntax
public static class 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
System.String config_string

Configuration Data in json form

Returns
Type Description
System.Boolean

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
System.Boolean

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
System.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
System.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
System.Boolean

returns true if TRN_LOG_ENABLE is defined in core

LogMessage(PDFNetInternalToolsLogLevel, String, String, UInt32)

Log a message to a particular stream using the core logging routines.

Declaration
public static void LogMessage(PDFNetInternalToolsLogLevel threshold, string message, string filename, uint line_number)
Parameters
Type Name Description
PDFNetInternalToolsLogLevel threshold

the importance of this log message

System.String message

the message to be logged

System.String filename

the filename from which the log message originates

System.UInt32 line_number

the line number from which the log message originates

LogStreamMessage(PDFNetInternalToolsLogLevel, String, String, String, UInt32)

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, uint line_number)
Parameters
Type Name Description
PDFNetInternalToolsLogLevel threshold

the importance of this log message

System.String stream

the name of the stream to which the message belongs (a category label)

System.String message

the message to be logged

System.String filename

the filename from which the log message originates

System.UInt32 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
System.String path_with_docs

The path to search within for documents to convert

Returns
Type Description
System.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
System.String log_filename

the name of the file to log into

Returns
Type Description
System.Boolean

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
System.String log_directory

the path of the directory to log into

System.String log_filename

the name of the file to log into

Returns
Type Description
System.Boolean

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
System.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

In This Article
Back to top Generated by DocFX