This content has been marked as final.
Show 2 replies
-
1. Re: pdf generation with images (from html source)
petitefl3ur.petitefl3ur.gmail.com Jun 18, 2010 4:56 AM (in response to petitefl3ur.petitefl3ur.gmail.com)Ok i have change the way i generate my pdf.
I split my text between html and images.
I load images from a absolute path in a BufferedImageAnd generate my pdf like this :
<ui:repeat value="#{documentPdf.pagesPdf}" var="_page" > <ui:repeat value="#{_page.elements}" var="_element"> <p:html> <font size="3" face="Arial"> <h:outputText escape="false" value="#{_element.htmlContent}"/> </font> </p:html> <s:fragment rendered="#{_element.image}"> <p:table columns="1" widthPercentage="100" borderWidth="0"> <p:cell borderWidth="0"> <p:image value="#{_element.imageContent}"/> </p:cell> </p:table> </s:fragment> </ui:repeat> <p:newPage/> </ui:repeat>
-
2. Re: pdf generation with images (from html source)
cathyben Aug 31, 2015 9:58 PM (in response to petitefl3ur.petitefl3ur.gmail.com)Thank you for the guide. I only find a guide about creating PDF from stream. Your code is of great help.