掲示板
Convert my HTML code in PDF Liferay 7
6年前 に Hisham Zoghbi によって更新されました。
Convert my HTML code in PDF Liferay 7
Junior Member 投稿: 32 参加年月日: 17/03/28 最新の投稿
Hello Guys,
Can I convert my Code from view.jsp to PDF und then send it per E-Mail? If so then plz with an example oder links that could help.
Thanks a lot
Sent from my iPhone with Liferay.com Forums
Can I convert my Code from view.jsp to PDF und then send it per E-Mail? If so then plz with an example oder links that could help.
Thanks a lot
Sent from my iPhone with Liferay.com Forums
6年前 に Jorge Díaz によって更新されました。
RE: Convert my HTML code in PDF Liferay 7
Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
In the past, in some projects, before using Liferay, I used following java library to transform from HTML to PDF: https://github.com/flyingsaucerproject/flyingsaucer/blob/master/README.md
But it seems it is not longer maintained, it only supports CSS 2.1
But it seems it is not longer maintained, it only supports CSS 2.1
6年前 に Neil Griffin によって更新されました。
RE: Convert my HTML code in PDF Liferay 7
Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
The Liferay Faces project maintains the jsf-export-pdf-portlet demo which utilizes the following dependency to convert HTML to PDF:
The code in PDFUtil.java shows how to do the conversion.
<dependency>
<groupid>org.xhtmlrenderer</groupid>
<artifactid>core-renderer</artifactid>
<version>R8</version>
</dependency>
The code in PDFUtil.java shows how to do the conversion.
6年前 に Hisham Zoghbi によって更新されました。
R: Convert my HTML code in PDF Liferay 7
Junior Member 投稿: 32 参加年月日: 17/03/28 最新の投稿
Thanks for the reply and the infos. But how can I import the dependencies if I'm using Liferay 7GA with Gradle Tool?
Sent from my iPhone with Liferay.com Forums
Sent from my iPhone with Liferay.com Forums
6年前 に Jorge Díaz によって更新されました。
RE: Convert my HTML code in PDF Liferay 7
Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
For gradle tool, include following dependence:
More info see: http://mvnrepository.com/artifact/org.xhtmlrenderer/core-renderer/R8
The library used in that jsf-export-pdf-portlet example (org.xhtmlrenderer) is the same library I said in my previous comment (flying saucer).
See:
So you will have problems with CSS3 or not xhtml code.
If you have problems with non xhtml code you can always use jtidy library to convert html to xhtml (http://jtidy.sourceforge.net/)
compile group: 'org.xhtmlrenderer', name: 'core-renderer', version: 'R8'
More info see: http://mvnrepository.com/artifact/org.xhtmlrenderer/core-renderer/R8
The library used in that jsf-export-pdf-portlet example (org.xhtmlrenderer) is the same library I said in my previous comment (flying saucer).
See:
- ITextRenderer.java: https://github.com/flyingsaucerproject/flyingsaucer/blob/master/flying-saucer-pdf/src/main/java/org/xhtmlrenderer/pdf/ITextRenderer.java
- flyingsaucerproject: https://github.com/flyingsaucerproject/flyingsaucer/blob/master/README.md
So you will have problems with CSS3 or not xhtml code.
If you have problems with non xhtml code you can always use jtidy library to convert html to xhtml (http://jtidy.sourceforge.net/)
6年前 に Hisham Zoghbi によって更新されました。