Link
Skip to main content

How to get JPedal log file and log activity?

This can be done by adding the following lines of code to your application using JPedal.

//Output log information to console
LogWriter.setupLogFile("v");

//Specify file to store log information added to console
LogWriter.log_name =  "log.txt";

JPedal does not include any dependencies on Logger or any other Logging framework, but it does provide a mechanism to pass messages through or handle yourself. You can do so by adding a LogScanner to the LogWriter.

This could be used to implement custom functionality such as adding popup dialogs for certain error messages or allowing you to custom functionality for different types of message.

//Specify file to store log information added to console
LogWriter.logScanner = message -> {
    if (message != null && message.startsWith("[MEMORY]")) {
        //Implement you own custom functionality for this message
        //Or call Logger. or other logging framework.
    }
};

Why JPedal?

  • Actively developed commercial library with full support and no third party dependencies.
  • Process PDF files up to 3x faster than alternative Java PDF libraries.
  • Simple licensing options and source code access for OEM users.

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download