Forum Replies Created
-
AuthorPosts
-
in reply to: permgen leak July 28, 2012 at 21:16#29074
After a little more poking around with VisualVM, this seems to be the result of a java.security.ProtectionDomain instance hanging onto the web application. This gets loaded when rendering is triggered with an image.
Clearing caches with clearCache obviously won’t help. At this point, I’m not sure how to manage the issue.
Any thoughts would be greatly appreciated.
in reply to: HTML/CSS rendering issues July 30, 2012 at 19:58#26759I have a simple table with the following style sheet.
.CenterDiv
{
margin-left:auto;
margin-right:auto;
}It centers properly in HTML but stays left aligned when exported to PDF.
What is wrong? Is this CSS supported?Thanks in advance,
Clifton Sothoronin reply to: Troubleshooting July 31, 2012 at 02:49#26760nested table does not give correct pdf .Pl help
see the attached file when i convert it to pdf last cells are not appearing
Inv_No address catecode ServiceNo Month Prev_Amt Late_chrg Recvd Adj CurTot Fixed Charge Internationl Roaming:06-01-2012:31-01-2012 Fixed Charge Internationl Roaming:03-01-2012:05-01-2012 Fixed Charge Internationl Roaming:01-01-2012:02-01-2012 Local Charges STD Charges SMS Charges Discount Payable 100138440102 DelhiDLIND110016 Individual 919868 : Dolphin Saathi : 29-Dec-11 Jan,12 1648.00 10.00 3296.00 0.00 377.00 75.48 8.71 5.81 246.30 5.30 0.25 0.00 -1271.00
in reply to: permgen leak July 31, 2012 at 14:58#29075Hmm… In PD4ML sources there is no explicit references to java.awt.MediaTracker.
In PD4ML images are loaded from input stream to a byte array. After an image type analyze, in most of the cases it creates Image instance with
[language=java:tohf53k2]Image img = new ImageIcon(idata).getImage();[/language:tohf53k2]
As I see, the call implicitly involves the media tracker. However it is not obvious how to unregister the image out of there.
-Dpd4ml.cache.images.in.tmp.dir=true JVM flag (or an identical dynamic parameter, passed via API) forces PD4ML to immediately dump loaded image bytes to a TMP file and to set the above img = null. Now I am not sure if that is enough, bearing in mind the media tracker. Do you have an idea what needs to be done there?
in reply to: permgen leak July 31, 2012 at 16:20#29076@PD4ML wrote:
-Dpd4ml.cache.images.in.tmp.dir=true JVM flag (or an identical dynamic parameter, passed via API) forces PD4ML to immediately dump loaded image bytes to a TMP file and to set the above img = null. Now I am not sure if that is enough, bearing in mind the media tracker. Do you have an idea what needs to be done there?
I’m not sure what needs to be done. Setting that property at the JVM level does not seem to impact the permgen leak. Also, using the API directly and calling clearCache() does not seem to help.
An interesting observation on Glassfish is that the images (resources/icons, resources/dialogs) seem to be unpacked. Does the code traverse the classpath using ResourceAsStream and cache the PD4ML – supplied images before loading user – supplied images? I’ll take a look with VisualVM and see if these images are registered in MediaTracker.
Being a systems architect and not a full time Java developer, I hope I’m not wandering too far off in the weeds.
Thanks for the reply.
/mde/in reply to: HTML/CSS rendering issues July 31, 2012 at 22:03#26761I have a webapp in a directory called PRC. In the PRC/Pages/test.jsp file, I have a line like this:
<img alt="Delete This Assignment" align="top" src="/Common/Images/icon_delete.gif" />
It displays fine on the HTML page, but when it’s converted to PDF, the image is missing. I’m assuming PD4ML is looking for that image in the PRC context and not the context called Common. How can I make it find the image in the other context?
I have other images on the same page like:
<img src="/PRC/Images/audit.png" border="0" alt="Click to view audit data." />
And that shows up fine when I convert the page to PDF. I need PD4ML to handle images from multiple contexts in one page.
I’m using the JSTL (JSP taglib) tags and not java/servlet code to convert the page to PDF.
in reply to: Troubleshooting August 2, 2012 at 06:48#26762I am now doing some feasibility study on PD4ML for our project and but found some problem on using the barcode font “3of9.ttf”, if I want to generate the bar code using this font, the bar code will become mashed (line 1 and 2 of the attachment), but if I change back to use “Free3of9.ttf” as the barcode font type, the barcode displayed is correct (line 3 and 4 of the attachment).
But due to some limitation, I can just use the “3of9.ttf” font type, so is there any solution for me on this problem.
Thanks all.
Free3of9.ttf can be download at following link
http://www.barcodesinc.com/free-barcode-font/in reply to: Anybody had problems with PD4ML on Lion for Mac? August 2, 2012 at 09:23#28974I have a genius colleague who has found the solution.
There is a problem calling the Apple toolkit on Lion, so you have to add the following parameter to the Tomcat launch script.
-Dawt.toolkit=sun.awt.HToolkit
The discussion about this you can find here:
http://blog.maestropublishing.com/?tag=macin reply to: Nest of table tag August 2, 2012 at 16:47#29085I guess under “last cells are not appearing” you mean the table is cut right side.
If so, you’d only need to increase htmlWidth conversion parameter. I’ve attached PDF result with htmlWidth=1700
in reply to: margin-left:auto margin-right:auto not working August 2, 2012 at 17:47#29077The CSS properties are not supported by PD4ML.
For tables there is a non-standard workaround:
[language=css:ilomyxlf]@media pdf {
table.CenterDiv {
align:center;
}
}[/language:ilomyxlf]in reply to: margin-left:auto margin-right:auto not working August 2, 2012 at 18:40#29078Thank you for replying. I modified my .CSS file to include the following. The PDF output did not change. Is there something else?
Best,
Clif…@media pdf {
table.CenterDiv {
align:center;
}
}
.CenterDiv
{
margin-left:auto;
margin-right:auto;
}in reply to: margin-left:auto margin-right:auto not working August 2, 2012 at 18:41#29079Do you need to center a TABLE or a DIV?
in reply to: margin-left:auto margin-right:auto not working August 2, 2012 at 18:45#29080It’s a table under a DIV. I’ve tried setting the class on the Body, Div and Table and can’t make it center.
Best,
Clif…in reply to: margin-left:auto margin-right:auto not working August 2, 2012 at 18:48in reply to: margin-left:auto margin-right:auto not working August 2, 2012 at 18:54 -
AuthorPosts