有没有免费的组件可以将阿拉伯语 html 转换为 pdf?

发布于 2024-09-02 17:01:56 字数 1539 浏览 9 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一个人练习一个人 2024-09-09 17:01:56

你手上有c#代码吗?
有一个在线资源讨论如何使用 itextsharp 创建 PDF。
是字符集、字体的问题还是从右到左的问题?

http://www.devshed.com /c/a/Java/Creating-Simple-PDF-Files-With-iTextSharp/

http://www.codeproject.com/KB/graphics/ITextSharpHelperClass.aspx

我希望它能有所帮助

do you have the c# code in hand?
there is this online resource discussing how to use itextsharp to create PDF.
is it a problem of characterset, font or right to left problem?

http://www.devshed.com/c/a/Java/Creating-Simple-PDF-Files-With-iTextSharp/

http://www.codeproject.com/KB/graphics/ITextSharpHelperClass.aspx

I hope it can help

盛装女皇 2024-09-09 17:01:56

Apache PDFBox 可以做到这一点,但可能无法达到您需要的渲染质量。您可能必须使用 Apache Tika 从 HTML 中获取文本,从而丢失大部分格式。无论如何,我担心让您走上各种 Java 组件的道路不会让您满意,但这是我所知道的唯一可以处理 RTL PDF 文件的免费代码。这并不意味着它是唯一存在的代码。

Apache PDFBox can do this, but perhaps not with the quality of rendering that you need. You might have to use Apache Tika to get the text out of the HTML, thus losing much of the format. In any case, I fear that sending you off down a path of various Java components won't float your boat, but it's the only code I know of for free that deals with RTL PDF files. Which does not mean that it's the only code that exists.

恬淡成诗 2024-09-09 17:01:56

这些示例涉及创建新文档并添加一些元素作为短语、表格或单元格 - 我的意思是我创建并连接文档 - 逐项 -
但我的情况不同,

我将 HTML 内容存储在数据库中 - 我检索它并将其显示在 HTML 页面上,

而且我在 HTML 中有阿拉伯语,它转换为空 pdf

我使用 asp.net 和 C# 将此阿拉伯语 HTML 内容转换为pdf
我用itextsharp
为了达到这个目的

these examples are dealing with creating new documents and adding some elements as phrase or table or cell - i mean that i create and concatenate the document - item by item-
but my case is different

i have the HTML content stored in DB - i retrieve it and display it on HTML page

also i have ARABIC in the HTML which convert as an empty pdf

i use asp.net with C# to convert this ARABIC HTML content to pdf
i use itextsharp
to achieve this

╄→承喏 2024-09-09 17:01:56

我认为 CutyCapt 是您需要的实用程序,它可以将 html 转换为 pdf 和许多其他格式。

I think CutyCapt is the utility you need, it can convert the html to pdf and many other formats.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文