この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hi,
I want to create PDF of an page.My requirement is there will be a component as "Download as PDF" when i click on that component the current page will download as pdf.
I gone through about Apache FOP and i created a sling servlet when i clicking on the above mentioned component made a ajax call to servlet and in my method am using Apache fop. Now i want to download the page as pdf.What should i do next?. Am unable to read page2fo.xsl file under /libs/wcm/core/content/pdf/page2fo.xsl
i will define my design of pdf in page2fo.xsl file. Now i want to access my page content to populate on pdf and convert the xsl to xslfo format then only i can convert it into pdf. Is am in right path?.
Design is common for pdf.
And i don't want to use any third party bundle like itext, PDFbox
Any code snippet will heelpful.
Thanks,
Mohamedh Nishadh
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
Hi,
have you tried to request the page as PDF directly?
For example, when I request http://localhost:4502/content/geometrixx/en.html, I get the HTML rendition. When I request http://localhost:4052/content/geometrixx/en.pdf I get the page as PDF.
The magic lies in the mapping of the pdf extension to xml, and then rewriter configuration, plus the page2fo.xsl. You shouldn't need to programm a servlet and invoking FOP manually.
You can find a nice article on this on [1].
kind regards,
Jörg
[1] http://www.cqblueprints.com/tipsandtricks/pdfrendering.html
表示
返信
いいね!の合計
What version of AEM are you using?
表示
返信
いいね!の合計
AEM 5.6
Thanks,
Moahmedh Nishadh
表示
返信
いいね!の合計
Hi,
have you tried to request the page as PDF directly?
For example, when I request http://localhost:4502/content/geometrixx/en.html, I get the HTML rendition. When I request http://localhost:4052/content/geometrixx/en.pdf I get the page as PDF.
The magic lies in the mapping of the pdf extension to xml, and then rewriter configuration, plus the page2fo.xsl. You shouldn't need to programm a servlet and invoking FOP manually.
You can find a nice article on this on [1].
kind regards,
Jörg
[1] http://www.cqblueprints.com/tipsandtricks/pdfrendering.html
表示
返信
いいね!の合計
Yes when i tried with .pdf extension. The page is not loading.
表示
返信
いいね!の合計
Yeah i gone through that URL. If i don't want an servlet how can i download the pdf when that particular button has clicked.
Thanks,
Mohamedh Nishadh
表示
返信
いいね!の合計