[英]How to load dll file in acrobat javascript?
这是我在js文件中加载dll的步骤var x = callFunction();
function callFunction()
{
var mylib = new ExternalObject ("lib:fullPath:PrintableInt.dll");
var a = new PrintableInt(1);
alert(a);
mylib.unload();
}
新的PrintableInt(1)出现错误; 行,指出PrintableInt没有构造函数
-我正在使用Adobe ExtendScript工具包
-我点击了以下链接:第200页间接访问https://www.adobe.com/content/dam/Adobe/en/devnet/scripting/pdfs/javascript_tools_guide.pdf
我为dll编写了c ++类,如下所示
#pragma once
// PrintableInt.h
#pragma once
#include <string>
class PrintableInt
{ public:
// Constructor
PrintableInt(int value);
// Converts the int into a string.
std::string toString()
const; private:
int m_value;
};
include "stdafx.h"
include "PrintableInt.h"
include <sstream>
PrintableInt::PrintableInt(int value)
{ m_value = value; }
std::string PrintableInt::toString() const
{
std::ostringstream builder;
builder << m_value;
return builder.str();
}
请提供您的反馈。
提前致谢
Acrobat使用自己的JavaScript变体(Acrobat JavaScript),除了JavaScript Core外,它与ExtendScript没有太多共同点。
您必须参考Acrobat JavaScript文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.