问题标签 [pdfmake]
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.
javascript - 如何使 pdfMake 动态工作?
如果我们有数百个,还有其他方法可以打印汽车[Array] 名称吗?
jquery - PDFmake - html 表到 pdfmake 表?
我正在尝试制作一个包含 html 表的应用程序。
我想要一个下载按钮和 onClick 事件,下载一个包含所有 html 表的 PDF 文件。
可以做到吗?
有人可以帮助我将html表转换为对象以便可以通过pdfmake将其推送到PDF文件中吗?
javascript - 使用pdfmake水印
在 Javascript 中,我使用 pdfmake 生成 pdf 文档。我从 github 上读到它支持水印,以下是我的用法,但它给了我一些随机和奇怪的字符。无论水印中提供什么文本,这些字符都是相同的。有人有想法吗?
angularjs - ui-grid:使用 pdf 导出时如何设置列宽
使用 ui-grid 导出 pdf 时如何设置列宽。Pdfmake 具有宽度选项,但是 ui-grid exporter api 文档在任何地方都没有此选项。
谢谢您的帮助
css - pdfmake API?是否有样式、字体、功能列表?
我正在使用pdfmake。我想格式化一个文档,他们在 github 和他们的操场上有很好的例子,但我想知道他们是否在其中提供了所有功能。我觉得它们可能是额外的属性,比如切换字体、添加不同的样式元素或下划线——示例中没有明确共享的东西。也许您所看到的就是您所得到的,仅此而已,但我非常彻底地浏览了 github 页面,并没有找到更详细的功能列表。它似乎与 html 相似,但它似乎没有 html/css 相同的样式功能,如果还有更多内容,请有人指出。
javascript - 如何使用 makepdf 将 Web Worker 应用于 PDF 的呈现
我使用 JavaScript 插件 ( pdfmake ) 成功创建了一个 PDF,它很棒。但是,当我尝试渲染约 8,000 行的库存/分类帐打印输出时,它会冻结超过一分钟。
这就是我通常声明我的 docDefinition 的方式
在哪里
和
我搜索了 web workers 发现它可以解决这个 UI 冻结问题。所以我尝试为它创建一个网络工作者:
//worker.js
输出console.log()
:
Worker 说: Object {pageOrientation: "portrait", content: Array[7]} 它正确记录了 json 结构。
到目前为止,一切都很好。但是在我添加pdfmake.min.js
到vfs_font.js
工人之后,我得到了错误Uncaught TypeError: Cannot read property 'createElementNS' of undefined
。
我什至在开始使用工人之前就收到了错误。
是否可以使用 pdfmake 插件实现 web worker?
javascript - 如何以编程方式创建 PDFmake docDefinition
我正在尝试通过docDefinition
从我的范围数据动态创建 PDF 来创建 PDF。
我的数据在不断变化,因此动态创建至关重要。
以下是我到目前为止所做的,但是我无法让我的图像显示在 docDefinition 对象/数组中。
传入的数据结构如下:
这就是我在以下方面的进展docDefinition
:
javascript - Use Glyphicons or Font-Awesome in pdfmake prints
I am developing a webapp using pdfmake for the printing. In more recent days I started using Glyphicons and Font-Awesome-Icons in my project, now I need those in the printout as well.
But I can't really imagine what would be the best way to achieve this.
I see two possibilities:
Include the respective Font in pdfmake and create something like a map which determines the Icons font-representation by it's class name (because this is what is used in the app). In this case I could still use the font colors for the Icons
I could use something like phantomJS to generate Images of the Icons, but I don't really like this idea, because I would loose the possibility to easily change the icon's color and i would have to maintain this picture collection somehow.
Any Ideas, Comments or solutions? I would really appreciate it :)
angularjs - 带有 Ionic Cordova 应用程序的错误 URL pdfMake.js
我在使用 pdfMake.js 库时遇到问题。这个库应该只在客户端生成 PDF。它适用于 chrome、Firefox ......但是当我在设备(在我的情况下为 Android)上启动我的 ionic 应用程序时,出现以下错误:
我之前在使用 AngularJs 之前遇到过这个问题,例如 Blob ......并且使用以下配置有效:
但不在这里... :(
你知道如何允许 data/pdf 吗?
谢谢 !
javascript - 生成包含拉丁文/中文/日文字符的 PDF
我尝试使用支持拉丁/中文/日文字符的 jsPDF 和 pdfmake javascript 库在客户端生成 PDF。
jsPDF 的问题在于它没有 UTF-8 支持,并且无法添加自定义字体。pdfmake 的问题是我无法添加超过 95 个字形的字体。
我还尝试使用带有文本的画布并使用 fromHTML 函数(jsPDF)将其添加到 PDF,但我需要小字体大小的文本,并且画布的质量很差。
我还需要在 PDF 中包含图表,但我已经使用 Google Charts API(客户端)进行了工作。
该网站是用经典的 ASP 编写的。
请给我一些建议好吗?