Forum Replies Created
-
AuthorPosts
-
in reply to: uncorrect size for image September 17, 2010 at 15:30#27824
I expected you send us at least form_ctact_titre1.jpg. Your HTML/CSS implicitly assumes dimensions of the image, which are not known to me.
@jj_ben wrote:
When i try to generate the html page, the picture of orange bars have not the correct size.
if i add the height of img directly in the css it works :
.formCtactTitre1, .formCtactTitre1Off { width:731px; height:32px; padding:7px 5px 0 30px; font-size:12px; font-weight:bold; color:#FFF; } .formCtactTitre1 { background:url(images/form_ctact_titre1.jpg) no-repeat center;height:40px; margin:5px 0 2px 0 }With height:40px; you do not scale the image, but increase the DIV height (overriding previous height:32px setting). Obviously form_ctact_titre1.jpg height is about 40px (greater than the initial 32px).
I tried to reproduce the situation, when background image height is less than the box. See attached – PD4ML does not center the background vertically. It is a good question why MS IE does. CSS requires a vertical positioning hint given explicitly:
background:url(images/form_ctact_titre1.jpg) no-repeat center center;
With the CSS change PD4ML positions the background image correctly.
in reply to: How To Put a Colspan of Td Tag in Table September 17, 2010 at 15:56#28208It is quite difficult to see, what you expect to render from the code.
As there is no any neighbor rows and columns, colspan=”3″ is optimized to colspan=”1″. In standard scenarios, like below, colspans work correctly.<table border=1 width=100 height=100> <tr> <td class="blank" colspan="3"> </td> </tr> <tr> <td class="blank"> </td> <td class="blank"> </td> <td class="blank"> </td> </tr> </table>
in reply to: HTML/CSS rendering issues September 18, 2010 at 07:22#26455Hi All,
IS IT Work HTML TD Col-Span Attribute In PD4ML ?
If It Is work:
We Have One Table the columns of it Doesn’t span. Please Give Me Help For The How To Col-span For Table Columns
The Table Code IS
<table border=1 width='100%' height='100%'> <tr> <td >data</td> <td >data</td> <td >data</td> <td >data</td> <td >data</td> </tr> <tr> <td colspan="3">span</td> <td colspan="2">span</td> </tr> </table>
When We Execute This Html code They Given PDF File Doesn’t Shows the Table col-span
Please Give me help For This ProblemI Show the PDF File Below Please See it and Edit The My Code
in reply to: IS IT Work HTML TD ColSpan Attribute In PD4ML ? September 18, 2010 at 11:41#28210Try to add any content to the table cell (for example, ) or to apply the following CSS style to the table:
table { empty-cells: show; }in reply to: IS IT Work HTML TD ColSpan Attribute In PD4ML ? September 18, 2010 at 12:34in reply to: Custom PD4ML classloader September 18, 2010 at 15:09in reply to: pd4ml https image urls September 19, 2010 at 10:34#28165PD4ML cache is a static hash table with soft references to loaded objects. After JVM is stopped, the cache, of course, disappears. Also a shortage or heap space may cause a cache reset.
I would recommend you to ignore the debug output and to focus on the resulting documents. If there are no missing images and external styles are applied correctly – there are no reasons for a panic.
in reply to: direction=rtl not working September 19, 2010 at 10:43#28151We’ll start to work on it from the middle of September.
in reply to: Troubleshooting September 21, 2010 at 17:10#26457Hello,
I am trying to output the of a JSF page to a pdf file. The converted HTML tags from JSF pages are written to the pdf file instead of the contents.
Have been trying to resolve this for a while. Any help is very much appreciated.
My intend is to store the byteArray. Just to make sure the bytearray content is good, I am creating this temporay pdf file.The content written to the pdf file is (Full file is not written, maybe buffer size issue):
<form id="form1" name="form1" method="post" action="My code is
String sessionId = null; HttpServletRequest request = (HttpServletRequest) getFacesContext(). getExternalContext().getRequest(); HttpServletResponse response = (HttpServletResponse) getFacesContext(). getExternalContext().getResponse(); Cookie[] cookies = request.getCookies(); for (int i = 0; i < cookies.length; i++) { Cookie cookie = cookies[i]; if ("OFSE_JSESSIONID".equals(cookie.getName())) { sessionId = cookie.getValue(); break; } } StringBuffer url = new StringBuffer(request.getRequestURL()); String host = url.substring(0, url.indexOf("Review.faces")); HttpURLConnection conn = null; InputStream inputStream = null; FileOutputStream os = null; ByteArrayOutputStream bs = null; Document document = null; try { URL printableSummaryPage = new URL(host.concat("PrintableReview.faces")); conn = (HttpURLConnection) printableSummaryPage.openConnection(); conn.setUseCaches(false); conn.setRequestProperty ("Content-Type","application/pdf"); conn.setRequestProperty("Cookie", "OFSE_JSESSIONID="+sessionId); conn.setRequestMethod("POST"); conn.connect(); inputStream = conn.getInputStream(); bs = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int readCount = 0; document = new Document(); os = new FileOutputStream(new File("c:\PdfTest\sample.pdf")); PdfWriter w = PdfWriter.getInstance(document, os); document.open(); while ((readCount = inputStream.read(buffer)) != -1) { if (readCount < 1024) { bs.write(buffer, 0, readCount); } else { bs.write(buffer); } document.add(new Paragraph(new String(buffer))); } document.close();Thank you
in reply to: Troubleshooting September 21, 2010 at 17:11#26458Hello,
I am trying to output the of a JSF page to a pdf file. The converted HTML tags from JSF pages are written to the pdf file instead of the contents.
Have been trying to resolve this for a while. Any help is very much appreciated.
My intend is to store the byteArray. Just to make sure the bytearray content is good, I am creating this temporay pdf file.The content written to the pdf file is (Full file is not written, maybe buffer size issue):
<form id="form1" name="form1" method="post" action="My code is
String sessionId = null; HttpServletRequest request = (HttpServletRequest) getFacesContext(). getExternalContext().getRequest(); HttpServletResponse response = (HttpServletResponse) getFacesContext(). getExternalContext().getResponse(); Cookie[] cookies = request.getCookies(); for (int i = 0; i < cookies.length; i++) { Cookie cookie = cookies[i]; if ("OFSE_JSESSIONID".equals(cookie.getName())) { sessionId = cookie.getValue(); break; } } StringBuffer url = new StringBuffer(request.getRequestURL()); String host = url.substring(0, url.indexOf("Review.faces")); HttpURLConnection conn = null; InputStream inputStream = null; FileOutputStream os = null; ByteArrayOutputStream bs = null; Document document = null; try { URL printableSummaryPage = new URL(host.concat("PrintableReview.faces")); conn = (HttpURLConnection) printableSummaryPage.openConnection(); conn.setUseCaches(false); conn.setRequestProperty ("Content-Type","application/pdf"); conn.setRequestProperty("Cookie", "OFSE_JSESSIONID="+sessionId); conn.setRequestMethod("POST"); conn.connect(); inputStream = conn.getInputStream(); bs = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int readCount = 0; document = new Document(); os = new FileOutputStream(new File("c:\PdfTest\sample.pdf")); PdfWriter w = PdfWriter.getInstance(document, os); document.open(); while ((readCount = inputStream.read(buffer)) != -1) { if (readCount < 1024) { bs.write(buffer, 0, readCount); } else { bs.write(buffer); } document.add(new Paragraph(new String(buffer))); } document.close();Thank you
in reply to: Troubleshooting September 21, 2010 at 17:21#26459Hello,
I am trying to output the of a JSF page to a pdf file. The converted HTML tags from JSF pages are written to the pdf file instead of the contents.
Have been trying to resolve this for a while. Any help is very much appreciated.
My intend is to store the byteArray. Just to make sure the bytearray content is good, I am creating this temporay pdf file.The content written to the pdf file is (Full file is not written, maybe buffer size issue):
<form id="form1" name="form1" method="post" action="My code is
String sessionId = null; HttpServletRequest request = (HttpServletRequest) getFacesContext(). getExternalContext().getRequest(); HttpServletResponse response = (HttpServletResponse) getFacesContext(). getExternalContext().getResponse(); Cookie[] cookies = request.getCookies(); for (int i = 0; i < cookies.length; i++) { Cookie cookie = cookies[i]; if ("OFSE_JSESSIONID".equals(cookie.getName())) { sessionId = cookie.getValue(); break; } } StringBuffer url = new StringBuffer(request.getRequestURL()); String host = url.substring(0, url.indexOf("Review.faces")); HttpURLConnection conn = null; InputStream inputStream = null; FileOutputStream os = null; ByteArrayOutputStream bs = null; Document document = null; try { URL printableSummaryPage = new URL(host.concat("PrintableReview.faces")); conn = (HttpURLConnection) printableSummaryPage.openConnection(); conn.setUseCaches(false); conn.setRequestProperty ("Content-Type","application/pdf"); conn.setRequestProperty("Cookie", "OFSE_JSESSIONID="+sessionId); conn.setRequestMethod("POST"); conn.connect(); inputStream = conn.getInputStream(); bs = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int readCount = 0; document = new Document(); os = new FileOutputStream(new File("c:\PdfTest\sample.pdf")); PdfWriter w = PdfWriter.getInstance(document, os); document.open(); while ((readCount = inputStream.read(buffer)) != -1) { if (readCount < 1024) { bs.write(buffer, 0, readCount); } else { bs.write(buffer); } document.add(new Paragraph(new String(buffer))); } document.close();Thank you
in reply to: IS IT Work HTML TD ColSpan Attribute In PD4ML ? September 22, 2010 at 21:27#28212Hmm… Of course I tried and it does work. See attached.
I copy-pasted HTML from your post.Are there any exceptions or error messages printed to STDOUT (or server’s log)?
in reply to: HTML/CSS rendering issues September 23, 2010 at 08:34#26456Hi,
At the moment I am evaluating pd4ml pro for a client. I have an issue with the JSP-tag pd4ml:header. I am using the following code :
<pd4ml:transform screenWidth="400" pageFormat="A4" pageOrientation="portrait" pageInsets="20,20,90,20,points" enableImageSplit="false" fileName="${filename}.pdf" enable="true"> <pd4ml:header areaHeight="90"> <table width="360"> <tr> <td style="width:36px;"><img src="/images/logosmall.png" style="margin-right:15px;" width="36" height="45"/></td> <td valign="bottom" style="text-align:left; "> <div style="font-size:15px; display:inline-block;text-align:left; "> TESTING THIS </div> <div style="font-size:9px; display:inline-block; text-align:left;"> <b>created by:</b> Ruben Thys<br/> <b>created on:</b> ${creationDate} </div> </td> </tr> </table> </pd4ml:header>The strange thing is sometimes my header disappears when my document contains more or less text! When I set enableImageSplit to ‘true’, my header appears and everything is rendered perfect.
Is there an alternative way of implementing this ?
Is this a known issue, because before buying the product we have to know if we could use this feature…
Thanks in advance!
Ruben
in reply to: pd4ml:header enableImageSplit problem September 23, 2010 at 11:12#28213As far as I remember we already addressed the issue. Which version of PD4ML do you use?
A better approach would be to use <pd4ml:page.header> tag instead. Some info about headers/footers in PD4ML:
html-pdf-faq-f1/pdf-page-headers-footers-definition-options-t41.html
in reply to: HTML/CSS rendering issues September 24, 2010 at 11:42#26460Hi All,
I Have One Small Problem i.e we have One Table The Table Header Are Print In Each Page
How To I Write A code Please Tell Me!
Note:- I am Writing The Code In html.
I Hope U have Solve This Small Problem
-
AuthorPosts
