简体   繁体   English

在 PDFTron 中使用时出错:' NetworkError(`Unsupported protocol ${this._url.protocol}`'

[英]error by using in PDFTron:' NetworkError(`Unsupported protocol ${this._url.protocol}`'

I trying to convert pdf file to pdfa3 file by using PDFTron.我尝试使用 PDFTron 将 pdf 文件转换为 pdfa3 文件。 I added current url_path.我添加了当前的 url_path。 the my code below:我的代码如下:

 var input_url = './utils/'; var input_filename = 'test.pdf'; var output_filename = 'test_pdfa.pdf'; var convert = true; var pwd = ''; var exceptions; var max_ref_objs = 10; var url_input = input_url + input_filename; console.log('Converting input document: ' + input_filename); var pdfa = await PDFNet.PDFACompliance.createFromUrl(true, url_input, '', PDFNet.PDFACompliance.Conformance.e_Level2B, exceptions, max_ref_objs);

get error: 'NetworkError( Unsupported protocol ${this._url.protocol} )',得到错误:'NetworkError( Unsupported protocol ${this._url.protocol} )',

Does anyone know what the problem is, And why doesn't it recognize the location?有谁知道问题是什么,为什么它不能识别位置?

I changed the code to: here .我将代码更改为: here

Now it's working!!现在它正在工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Socket.io v3 不支持的协议版本错误 - Socket.io v3 Unsupported protocol version error Tedious.js 不支持的协议 - Tedious.js Unsupported Protocol 使用构造函数在 Node 中解析没有协议的 URL - Parse URL without protocol in Node using constructor NW.js / Node.js 在使用 node-mssql 时抛出“SSL routines:ssl_choose_client_version:unsupported protocol”错误/乏味 - NW.js / Node.js throws "SSL routines:ssl_choose_client_version:unsupported protocol" error when using node-mssql / tedious 错误:无效的协议 - Error: Invalid protocol 在 ApolloGraphQL 中使用 TypeGraphQL 订阅时出错:UnsupportedProtocolError: Unsupported protocol "ws:" - Error when I use subscriptions in ApolloGraphQL with TypeGraphQL: UnsupportedProtocolError: Unsupported protocol "ws:" 节点 12 的 axios SSL 错误:SSL 例程:ssl_choose_client_version:不支持的协议 - axios SSL error with Node 12 : SSL routines:ssl_choose_client_version:unsupported protocol 在 NodeJS 中检查外部 URL 的协议 - Check the protocol of an external URL in NodeJS 不受支持的 `GLOBAL_AGENT.HTTP_PROXY` 配置值:URL 运行 electron-packager 时协议必须为“http:” - Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:" when running electron-packager 使用请求api(node.js)时发生未知协议错误 - Unknown protocol error while using request api ( node.js )
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM