使用PDFReactor预览时,在PDFReactor的源代码中调试javascript

时间:2017-10-10 07:55:17

标签: pdf-reactor

我在PDFReactor的源文档中运行了一些javascript,这不是一件容易的事。我找不到任何方法从javascript或任何调试工具获取日志。

我有没有看到某种方式?

我已经尝试过xconsole.io和jsconsole来查看远程日志记录/调试是否有效但是没有运气

1 个答案:

答案 0 :(得分:1)

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.