问题标签 [reportlab]
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.
python - ReportLab 中的非编号页面
是否可以使用 ReportLab 生成 PDF 文件,从而将首页(可能还有目录)从鸭嘴兽完成的页码中排除?
python - ReportLab: How to align a textobject?
I have the following ReportLab code:
What I want to achieve is: have a 3 (pixels?) space between each character (setCharSpace
), and align the resulting string in the center of a certain area in the page
The textobject is the only way, as far as I found, that I can specify a space between characters.
Any ideas?
python - 使用python将PNG转换为PDF
我想编写一个 python 脚本来将 PNG 转换为 2 页 pdf(即每个 PDF 2 个 PNG)。该软件需要在 Mac 和 Windows 7 上运行。
我目前的解决方案是使用 ReportLab,但在 Mac 上安装并不容易。根据其网站,它只有 Windows 的编译版本。它有一个跨平台版本,需要安装 C 编译器。
有没有更好的方法来做到这一点(这样我就不必在 Mac 上安装 C 编译器)?我应该使用不同的库还是完全不同的语言?只要我可以从 python 脚本调用程序,我就可以使用任何语言来创建 pdf。或者,是否有一个非常简单的(即非程序员可以安装它)C 编译器,我可以安装在 Mac 上?
你有什么建议吗?
python - reportlab:在 rml 中为 td 设置 colspan
我找不到任何选项,这将colspan
允许td
在rml
. 这有可能吗?
python - 我怎样才能知道,如果一个页面充满了reportlab PDF?
我正在使用 Reportlib(使用 c.draw() )创建 PDF 表。我不知道,由于动态内容,页面何时已满。如果我在页面末尾,我如何签出,以便添加页脚并执行 c.showPage() ?
django - 呈现从 SimpleDocTemplate 构建的 ReportLab pdf
我有一个 django 应用程序,该应用程序当前使用用户可以下载的画布生成 pdf。我创建了一个 StringIO 缓冲区,做一些事情,然后发送调用 response.write。
我现在想使用 platypus 和 SimpleDocTemplate 构建我的 pdf 并写了这个
但这不起作用,它会创建一个无法打开的坏 pdf。我假设这条线
是不正确的。
如何渲染 pdf?
image - 使用报告实验室的背景图像?
如何使用reportlab将背景图像添加到pdf页面?
python - 在 Python 中使用 Reportlab 的图像纵横比
我想在框架内插入图像。我找到了两种方法来做到这一点:
- drawImage(self, image, x, y, width=None, height=None, mask=None, preserveAspectRatio=False, anchor='c')
- 图像(文件名,宽度=无,高度=无)
我的问题是:如何在保持纵横比的同时在框架中添加图像?
svg - 使用reportlab用matplotlib生成的基于向量的图构建PDF
我正在尝试使用reportlab在 Django-Installation 的服务器端构建 PDF 文档。这些文档应该包含几个要使用matplotlib创建的图形。
我已经想出了如何通过将PIL-Image 对象直接传递给Image()
-flowable 来使 reportlab 使用 matplotlib 的图像而无需临时将它们转储到文件系统。这对于像 PNG 这样的光栅化图像格式非常有效。
现在,锦上添花的是能够嵌入基于矢量图的图形(如 SVG)。
我使用svglib将 matplotlib 生成的 SVG 转换为 reportlab 图形对象,但不幸的是 svglib 确实省略了刻度线和轴标签。在某些图表上,它通常会失败。
你有什么想法?