Debugging javascript in source for PDFReactor when using PDFReactor Preview

898 Views Asked by At

I have some javascript running in a source document for PDFReactor which is not trivial. I cannot find any way to get logging from the javascript or any debug tools.

Are there some way I am not seeing?

I have tried xconsole.io and jsconsole to see if remote logging/debugging would work, but have not had any luck

1

There are 1 best solutions below

0
On

It is possible to attach a log which also contains JavaScript debug output (e.g. produced with console.log()) to the resulting PDF.

When using the PDFreactor Preview this can be achieved by pressing the "Create PDF" icon and enable the "Debug Mode" check box in the "General" tab of the dialog that is opened.

If you have integrated PDFreactor into your application you can enable the debug mode like this:

// PHP
$config = array(
    "enableDebugMode"=> true,
    ...
);

// Java library
config.setEnableDebugMode(true);

// REST API
{ "enableDebugMode": true }

// JavaScript & Node.js 
config = { 
    enableDebugMode: true,
    ...
};

// .NET
config.EnableDebugMode = true;

// Perl
$config = {
    'enableDebugMode' => ('true'),
    ...
}

//Python
config = {
    'addLinks': True,
    ...
}

//Ruby
config = {
    'addLinks': true,
    ...
}

More information about the debug mode can be found IN the PDFreactor documentation.