Forum Replies Created
-
AuthorPosts
-
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 4, 2011 at 15:17#28357
Oh, ok… so I cannot do anything now because the picture URL is in an external server and I cannot manage it. The image will change depending the user selection so I cannot save and modify the picture in my own server.
Thank you so much and I will try it again in some months.
Thank you again.
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 4, 2011 at 15:31#28358It is probably a bit tricky, but you may implement on-a-fly image converter utilizing PD4ML custom resource loader technique
post43.html
and JAI library.in reply to: pdf renders garbled png image January 4, 2011 at 19:25#28325Thank you. Please let me know when the fix is available.
in reply to: IllegalStateException January 5, 2011 at 00:35#28334IllegalStateException: getOutputStream() has already been called is a known issue:
pdf-generation-troubleshooting-f4/getoutputstream-has-already-been-called-exception-t14.htmlIllegalStateException: http: //localhost/test.html: tried to write Y bytes with content-length Y is something new for us, but could also be caused by new line and whitespace characters lead
<pd4ml:transform>tagin reply to: PD4ML failed to load Servlet Dynamically generated JPG File January 5, 2011 at 06:14#28304not yet in cache: http://localhost:8080/tb/image/loadByFi … id=1000086
image size: 2644
image type of http://localhost:8080/tb/image/loadByFi … id=1000086 is unknown.I would recommend to copy-paste the URL to a web browser and to check what it actually returns. The 2644 bytes could be a textual error message.
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 5, 2011 at 09:05#28359Hello,
I am investigating it… I did some tests and when I check the next condition:img.getColorModel().getColorSpace().getType() == ColorSpace.TYPE_CMYK
I get always false. Debugging my code, I see that the color space is returned as RGB, so this condition cannot be true.
To arrive to this point, I get the image from the external server and I save it in my local server. It is recommended that the final solution doesn’t do that and work always in memory without save temp files.
The picture saved in my hard drive has wrong colours.
I’m a bit lost.
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 5, 2011 at 12:21#28360I opened the hi-res image in Photoshop and made sure: the image color space is CMYK.
> img.getColorModel().getColorSpace().getType() == ColorSpace.TYPE_CMYK
The request would make sense if you have a correctly instantiated Image object. But in your case it has internally thrown a sun.awt.image.ImageFormatException. So I suspect “img” object has default values of some properties.If I have time today or tomorrow I’ll try to create for you an “on-a-fly” converter from CMYK to RGB
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 5, 2011 at 13:02in reply to: HTML/CSS rendering issues January 5, 2011 at 14:27#26505Hi,
I have some problems when I try to get a pdf from an url. I checked the sites html syntax and found something like this:
<br /> <script>...</script><br /> <td height="700"><br /> <noscript><td height="300"></noscript><br />The first td is wrong. It should be deleted. The script adds a td dynamicly. The problem is, that I can not delete it. When I try to get a pdf file everything will be rendered until this code fragment.
Is it possible to configure pd4ml in a way that it ignores invalid html or is there any other solution?
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 10, 2011 at 08:27#28362did you achieve something?
in reply to: Troubleshooting January 10, 2011 at 08:59#26506Hello Support.
We implemented pd4ml in our Website, now we are facing the Problem of getting no Images in Firefox and Chrome.
The Transformation is made with the Taglib, here is the Code:
<%@ taglib uri="/WEB-INF/tld/pd4ml.tld" prefix="pd4ml" %><%@ page pageEncoding="UTF-8" %><pd4ml:transform<br /> screenWidth="800"<br /> pageFormat="A4"<br /> pageOrientation="portrait"<br /> pageInsets="10,10,10,10,mm"><br /> <br /> WEBSITE<br /> <br /> </pd4ml:transform>I added 3 Files:
HTML.png -> Screen of the Site without transformation (HTML…)
IE.pdf -> PDF generated by IE 8.0.6001.18702 (with Image)
Firefox.pdf -> PDF generated by Firefox 3.6.13 (no Image)Help or a Hint where to Search for the Solution would be appreciated.
in reply to: Debug – Blank Page Rendered from JSP? January 11, 2011 at 03:14#28310I’m facing the same problem….
I’m having<c:forEach> loop for an ArrayList on a JSP.... But PD4ML is not showing any data to me.... Only data in <th>
tags is displayed….Please help…
There must be some solution to this…in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 11, 2011 at 15:19#28363The attached code did the CMYK to RGB conversion trick for me.
in reply to: General questions / FAQ January 11, 2011 at 15:50#26420Hi,
I have generated 50 pages of pdf using pd4ml. It took around 30 seconds for generating the pdf. Any suggestions for improvements:
We are using following tags:
<pd4ml:transform/> <pd4ml:header/> <pd4ml:toc/> <pd4ml:page.break/> <pd4ml:footer/>
in reply to: Performance issue January 11, 2011 at 16:37#28112An HTML->PDF conversion procedure may be logically split to 3 phases:
1. document parsing and external resources (image, CSS) loading.
2. document layouting/redndering
3. PDF outputPDF pages output is swift procedure, which takes, as a rule, not more than 5-10% of the entire conversion time.
Parsing is also relatively fast, but loading of external resources may take some significant time due to network delays. To detect them, you may use the current debug mode. It dumps to STDOUT/server log as soon as a particular resource has been loaded.
The most resource consuming phase is HTML layouting/rendering. It depends on the document size and structure. For example, table layouting is done in three passes (min, max, optimal width). That means any nested table is layouted 9 passes, next nesting level – 27 passes and so on. Even if we added a detailed debug output for the phase, it will lead you to quite obvious discoveries: source document huge in size -> long conversion time; source document has multiple levels of table nesting -> long conversion time…
-
AuthorPosts
