问题标签 [princexml]

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.

0 投票
1 回答
229 浏览

princexml - 如何增加使用 Prince 程序创建的 PDF 中页面的尺寸?

Prince 使用 CSS 文件来设置它生成的 PDF 的属性。我尝试将命令添加body {height: 1536; width: 1024}到收到王子错误的 CSS 文件中:

没有这一行,文本不适合 PDF。

在此处输入图像描述

0 投票
1 回答
590 浏览

princexml - 如何创建没有分页符的 Prince PDF?

是否可以指示 Prince XML 从 HTML 转换并创建一个完全没有分页符的输出文件,一个只有一个连续页面的 PDF 文件?

0 投票
1 回答
547 浏览

c# - PDF files generated in Azure VM downloaded as 0 byte files

I'm generating PDF files using Prince XML in an Azure VM (by a web role) using C#, MVC3 and .NET 3.5. Action methods that are tagged with a PdfFilter() attribute forward the HTML to Prince XML; once the PDF has been created, the new file is written to the client using the following code:

I've confirmed that the PDFs are successfully created on the server. But when I attempt to send it back to the client by calling Response.WriteFile(), the client only sees the download as a 0-byte PDF -- it's unusable.

There aren't any exceptions being thrown, and the Prince XML log files indicate the files are all successfully generated. I've verified via C# and by remote desktop'ing into the Azure VMs that the PDFs -are- really being created and are readable there via a PDF reader.

Is there anything else I might be missing? Thanks in advance!

0 投票
1 回答
374 浏览

php - 如何使用 PHP 将 PrinceXML 文件写入服务器

尝试将 pdf 结果从 PrinceXML 写入服务器(在新的 pdf 文件中),而不是通过标头导出到 acrobat。下面的代码在浏览器上显示结果。

0 投票
3 回答
1098 浏览

php - 王子 xml 似乎不起作用

我已经创建了一个测试页面来使用 Prince xml 进行测试,但是这段代码似乎不起作用。

索引.php

每当我访问该页面时,都没有错误.. 它只显示回显的 $html 和'not'..

0 投票
1 回答
1026 浏览

php - 如何使用princeXML 和PHP 进行转换

我按照自述文件上的说明进行操作,但没有收到任何错误,也没有任何输出或写入日志文件的任何内容。那么,用王子将HTML文件转换为PDF的正确方法是什么,提前谢谢你。

0 投票
2 回答
11254 浏览

pdf-generation - FullCalendar 可以打印成 PDF 吗?

我曾尝试将 FullCalendar.js 渲染的日历打印为 PDF,但是可用的生成器似乎都不起作用:

  • Aspose PDF 不允许使用 JavaScript,而且直接不支持绝对定位的元素
  • PrinceXML 已知在处理无法在 IE、Chrome 或 Firefox 中重现的 JavaScript 时引发TypeError 异常的问题。

我对 PrinceXML 失败的最小复制示例是 Adam Shaw 的 FullCalendar 站点上的示例。即使我保存生成的 HTML(通过$("body").html())并将生成的 HTML 传递给 PrinceXML,从而绕过 PrinceXML 不正确的 JavaScript 处理,PrinceXML 也不会正确布置绝对定位的事件。

我有哪些选择?

0 投票
1 回答
2408 浏览

php - 如何使用每个页面上的动态内容更新页脚?

在我们的 PrinceXML pdf 中的每个页面中,我们需要根据 php 动态变量更改页脚中的内容。

有没有办法更新每页页脚中的内容?

(下面是css代码和div)

CSS:

页脚 div:

0 投票
3 回答
1245 浏览

html - Prince xml中未显示背景颜色

我正在使用 PrinceXML 在我的 .Net 应用程序中创建 PDF 报告。我已经在 HTML 中创建了报告,并且它几乎没有带有背景颜色的区域。但是在使用 PrinceXML 生成 PDF 报告时,这些背景颜色会丢失。我尝试用具有宽度和高度的背景图像替换背景颜色。他们仍然没有表现出来。就好像它已经完全删除了那个 CSS 区域。

以前有人遇到过这样的问题吗?PrinceXML 文档提到它们支持背景颜色和图像。

0 投票
0 回答
1170 浏览

php - 使用 Princexml 创建 PDF 文件

我想将我的 php 页面中的表格转换为 pdf .. 我将它通过一个表单元素并在其他页面上检索。我尝试使用许多 pdf 转换器,如 fpdf、dompdf 等,但遗憾的是没有一个有效。总是有一些错误。我也通过 mpdf 发现它工作正常,但不得不要求客户手动保存 pdf。

我尝试使用princexml 使用phpwrapper 文件(prince.php)。但我得到了弃用的错误。![][1]

我使用的代码如下

我想要 echo $prince->convert_string_to_file("Rahul","rahul.pdf",$msg[]); 去工作。请帮助......坚持了很长时间!