问题标签 [pdf-reactor]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
pdf-reactor - 可以使用 PDFreactor 从浏览器 DOM 创建 PDF 文档吗?
PDFreactor 是否可以用作 Web 服务,从而在浏览器上运行的 javascript 可以使用 REST API 将页面内容从 DOM 转换为 PDF?在这个应用程序中,在浏览器中呈现的内容是由浏览器端的javascript(使用D3库)专门生成的;这里的要求是从当前呈现的页面内容(通过按钮或菜单操作)向浏览器最终用户提供“导出为 PDF”类型的操作。然后目标是通过 REST API 将元素从当前 DOM 传送到 PDFreactor,以便 Web 服务可以生成 PDF。这是对 PDFreactor 的合理使用吗?
先感谢您。
php - PDFReactor cookie 是 HttpOnly 的吗?
我正在尝试将 cookie 从 PHP 传递到呈现的网页。
我的配置是:
$config = 数组(
但是当我尝试通过 document.cookie 访问 cookie 时,该属性为空。
有什么建议么?
css-paged-media - CSS3 paged media mode: Any way to prevent @top_right pdfreactor logo being inserted?
With any attempt to use paged media mode, with for example a style sheet containing :
Note the above does not contain ANY reference to embedded images, but when run through PDFreactor the resulting PDF
contains a small round radio-active graphic with the word "PDF" overlaid on top , in the @top-right content, after my
"$date : $initials" content.
I think this is "pdfreactor.svg" ?
So is it not possible to remove the logo ?
Moving all files named pdfreactor.svg under the PDFreactor/ installation directory to other locations did not help.
I am using the free-for-personal-non-commercial license which I obtained by email from Real Objects ,NOT the evaluation license .
Are personal non-commercial users not allowed to disable the inclusion of this logo in the page header block ?
Has anyone succeeded in disabling the inclusion of the logo image - if so, how ?
Also, does anyone know why the chapter & section counters are always displayed as 0 in the page header of the above document?
The Java I am using is:
javascript - 使用 pdfreactor 无法进行图像转换
我需要将html转换为pdf。为此,我正在使用 pdfreactor。我能够生成带有实际上是文本的正文内容的 pdf。但是当我试图将图像与身体分开时。我收到错误。** 加载资源失败:服务器响应状态为 500(服务器错误)**。基本上我想将图像转换为pdf。
html-to-pdf - 如何将 textarea 的 `text-indent`、`line-height` 属性应用于生成的 pdf 文档?
pdfreactor 服务器不适用于文本区域text-indent的line-height属性。如何固定?
<textarea style="height: 79px;width: 767px; text-indent: 63px; background-size: 100% 16px; line-height: 16px; left: 33px;top: 593px;font-size: 11px;font-family: Arial;background-image: none;background-color: white;color: black;">
This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a commentThis is a commentThis is a comment This is a comment This is a comment This is a commentThis is a commentThis is a comment This is a commentThis is a comment This is a comment This is a comment This is a commentThis is a commentThis is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a commentThis is a comment This is a comment This is a comment This is a comment 123456789123
</textarea>
以下图片展示了它在浏览器和 pdf 中的呈现方式(使用 pdfreactor 转换后)
上图(1.0)显示了它在浏览器中的显示方式。
上面的 (2.0) 图像显示了使用pdfreactor转换为 PDF 后的呈现方式
这些图像清楚地显示了转换上述 html 片段时未应用的文本区域的 text-indent 和 line-height 属性。在pdfreactor中呈现 textarea 的这些属性的任何解决方案?
angular - pdfreactor 中的角度 2/4 支持
我尝试使用 PDfReactor 转换角度 4 视图。仅转换了带有“正在加载...”的页面,但未转换实际视图。我已经在 PDFreactor 8.2.8867 中读到了 AngularJs 可以在没有变通方法的情况下使用。但是我找不到演示 AngularJs 使用的文档/示例。是否可以使用 Pdfreactor 转换 Angular 4 视图?
pdf-reactor - 使用 PDFReactor 预览时在 PDFReactor 的源代码中调试 javascript
我在 PDFReactor 的源文档中运行了一些 javascript,这不是微不足道的。我找不到任何从 javascript 或任何调试工具获取日志记录的方法。
有什么我看不到的方法吗?
我已经尝试过 xconsole.io 和 jsconsole 来查看远程日志记录/调试是否可行,但没有任何运气
css - 命名页面和弹性框在 PDFReactor 中不起作用
我正在尝试使用命名页面来使用 Node.js 包装器创建两个页面布局。我正在使用 PDFReactor version-10-beta。只有当我不使用 flexbox 时,它才能按预期工作。
如果我在 largePage 页面中使用 flexbox 样式,即使我设置了它的宽度(610 毫米)和高度(260 毫米),.cover-layer页面的大小也会变成这样。Fan-Fold European, Portrait但是使用当前的样式,它可以按预期工作。有人能指出为什么使用 flex box 和 css 命名的页面会导致不需要的页面布局吗?这是代码:
docker - 如何使用文件路径 URL 引用嵌入式 Docker 资源文件
我创建了一个 Docker 映像并在其中嵌入了一些静态资源文件,在 Dockerfile 中使用以下命令:
我有一个在 Docker 容器中运行的 Java Web 应用程序,它需要访问这些静态文件。必须使用 URL 提供文件路径,例如:
我能够以编程方式构建 URL,但不确定是否可以通过这种方式引用嵌入式文件。任何指导将不胜感激!
注意:我专门使用 pdfreactor Web 服务,因此我的 Dockerfile 是:
我正在尝试将 PDFreactor 包装器客户端的“BaseURL”设置为根资源文件夹。
javascript - SourceHanSansSC-Medium.otf 中打印的汉字未更正
描述:
我遇到了一个问题,一个中文字符(胸)在 html 中正常显示,带有“SourceHanSansSC-Medium.otf”字体,但打印在一个非常奇怪的位置,而 html 是由 pdf 反应器服务打印的。
如果我用 SourceHanSansSC-Norml.otf 替换它,那么 html 预览和 pdf-reacor 生成的 pdf 都运行良好,只有 SourceHanSansSC-Medium.otf 使用会导致这个问题。
我的环境:
- 系统:Mac os 10.12.6,Java 8 Pdf reactor 版本:10.0。
准备:
我从 docker hub 中提取了 pdf 反应器图像并将其作为本地 docker 容器运行,我的应用程序可以通过http://localhost:9423/service/rest访问它。
我写了一个非常简单的 html,其中包含SourceHanSansSC-Medium.otf和SourceHanSansSC-Medium.otf中的错误字符,只是为了比较两种字体的结果。它们都在 html 预览中正确显示,并且只有中等字体字符会打印在不正确的位置。
我将我的 html 本地父路径映射到 pdf-reactor /ro/config 以确保 pdf-reactor 能够获取要打印的 html。
HTML 代码:
这是我的 html 代码“print_sc_font.html”(我在 zip 中附加了 html 字体):
html预览没问题
Java 打印代码 (PdfReactorTest.java):
结果.pdf:
我附上了我的代码和屏幕快照。
SourceHanSansSC-Normal.otf 太大而无法附加,因此可以从https://github.com/adobe-fonts/source-han-sans/tree/release下载两个字体文件 SourceHanSansSC-Normal 和 SourceHanSansSC-Medium.otf /OTF/简体中文,



