HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › png images errors while parsing
- This topic has 14 replies, 2 voices, and was last updated Apr 20, 2011
17:07:30 by PD4ML.
-
AuthorPosts
-
March 23, 2011 at 05:39April 5, 2011 at 22:20April 6, 2011 at 06:47#28469
hello
please find the PNG that causes the parsing problem attached to the message . also find html that includes the image below
Untitled Page
???? ???????? ??????? ??????? ????? ???????? ??????? ?????? ????? ?????? ????????? ????????? ??????????? ???????????? ???????? ????????? ?????? United Arab Emirates Ministry of Interior Abu Dhabi Police G.H.Q Human Resources General Directorate G. Director Office
???????? : 11/2/33 ????????? : 15/10/2007 ? ????????? : 03/???? /1428 ?? ???? ?????? ????? ??????? ??????? ??????? : ???? ???????? ?? ???? ?? ??????/
????????? ???? ?????????????? ???? ??? : - asdfasdf
- 500254 – 10/10/2007
thanks
April 6, 2011 at 13:34April 6, 2011 at 16:53#28471ok now you can find it attached to the message and by the way its a signature
thank you very much
April 12, 2011 at 00:26April 12, 2011 at 13:03#28473Below is a copy of email sent to your email address (alrewards.com) on Apr. 07, 2011
I had no problems to convert an HTML with your image to PDF (see attached).
Is it exactly the same image, that caused the problem? As I see in your HTML sample there is no test_png.png reference.
Also in the servlet code please try to invoke
http://pd4ml.com/api/org/zefer/pd4ml/PD4ML.html#useHttpRequest(HttpServletRequest,%20HttpServletResponse)
method before pd4ml.render()Does it change anything?
April 14, 2011 at 00:34#28474hello
ok i will try again to do the change that you are refering to but please tell me exactly what do you mean by this
Also in the servlet code please try to invoke
http://pd4ml.com/api/org/zefer/pd4ml/PD4ML.html#useHttpRequest(HttpServletRequest,%20HttpServletResponse)
method before pd4ml.render()can you please clarify
thanks
April 14, 2011 at 01:29#28475also
i have tried the following html code and also i have embadded the png image , the same one attached previously
line one
line two line three
and i am getting the following error
java.lang.NumberFormatException: For input string: “/F”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at org.zefer.pd4ml.pdf.h$_b.o00000(Unknown Source)
at org.zefer.pd4ml.pdf.c.OÒ0000(Unknown Source)
at org.zefer.pd4ml.pdf.c.ø00000(Unknown Source)
at org.zefer.pd4ml.pdf.c.close(Unknown Source)
at org.zefer.pd4ml.pdf.PD4Device.dispose(Unknown Source)
at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
at org.zefer.pd4ml.PD4ML.render(Unknown Source)
at ae.rwd.model.Pdf.convertHtmlToPdf(Pdf.java:87)
at ae.rwd.servlet.PdfCreater.processRequest(PdfCreater.java:41)
at ae.rwd.servlet.PdfCreater.doGet(PdfCreater.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:662)thanks
April 14, 2011 at 19:04#28476Before
pd4ml.render();
call in your servlet code you need to invoke
pd4ml.useHttpRequest(httpRequest, httpResponse);
(where parameters are HttpServletRequest httpRequest and HttpServletResponse httpResponse)
April 15, 2011 at 00:25#28477hello
i tried that but its not working , i get the same error . i am sure its the png image i mean if i change the type of the image to any other type then its ok but when i try png its not workingplease help me
April 17, 2011 at 06:19April 18, 2011 at 10:10#28479As we wrote you before, the problem is caused by a corrupted PNG file. The original file seems to be ok, but probably it is damaged on the way to PD4ML. PD4ML only states that during parsing of the image by particular offset if found garbage instead of a numeric value.
Today we’ll prepare a version with a binary data dump, to check what is actually returned by PNG request. We’ll send you the version by email.
April 18, 2011 at 11:36#28480hello
ok thank you , i will wait for this version . hopefully we will get this ping issue solved after this invistigation .
thanks alot
April 20, 2011 at 17:07#28481Does it work with the patched version?
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.