tag:blogger.com,1999:blog-4129346287195722005.post6393618741502112196..comments2024-03-10T22:04:19.953-07:00Comments on ThinkTibits!: Java iText Convert HTML to PDF Example TutorialAnonymoushttp://www.blogger.com/profile/07717408059667602415noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-4129346287195722005.post-74364666870717127492021-01-29T02:22:04.950-08:002021-01-29T02:22:04.950-08:00i am not getting the image in my pdf, but the ther...i am not getting the image in my pdf, but the there is image in my html page.<br /><br />i am using the same code given aboveShekhar singhhttps://www.blogger.com/profile/06276391498241106108noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-14453830027398054092020-11-23T02:28:30.997-08:002020-11-23T02:28:30.997-08:00Can anyone help me to get away from this erro.
org...Can anyone help me to get away from this erro.<br />org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). java.io.IOException: Stream closed<br /><br />Programmerhttps://www.blogger.com/profile/17206860225879943869noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-46922044898948807172020-03-12T04:42:01.548-07:002020-03-12T04:42:01.548-07:00HI i executed your code but i see the below error
...HI i executed your code but i see the below error<br />I amusing Java 8.<br />Exception in thread "main" java.lang.NoSuchMethodError: org.xhtmlrenderer.layout.SharedContext: method ()V not found<br /> at org.xhtmlrenderer.pdf.ITextRenderer.(ITextRenderer.java:107)<br /> at org.xhtmlrenderer.pdf.ITextRenderer.(ITextRenderer.java:98)<br /> at CreatePDF.testpdf(CreatePDF.java:257)<br /> atAnonymoushttps://www.blogger.com/profile/10404502073117605074noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-75204894351378713472017-10-07T00:44:36.584-07:002017-10-07T00:44:36.584-07:00I am getting the below error:
org.xhtmlrenderer.la...I am getting the below error:<br />org.xhtmlrenderer.layout.SharedContext: method ()V not foundAnonymoushttps://www.blogger.com/profile/00262140974803407256noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-47442738024407773682017-06-06T00:54:36.324-07:002017-06-06T00:54:36.324-07:00where i have to put above fileswhere i have to put above filesAnonymoushttps://www.blogger.com/profile/05165004177735807541noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-9271061193574600272016-11-14T03:15:20.638-08:002016-11-14T03:15:20.638-08:00Exception in thread "main" java.lang.NoS...Exception in thread "main" java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.setMetricDefaults(ITextFontResolver.java:679)<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.(ITextFontResolver.java:610)<br /> at org.xhtmlrenderer.pdf.ITextFontResolver.addCourier(Anonymoushttps://www.blogger.com/profile/13678600430669476475noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-89227058237711090212016-11-14T03:14:44.936-08:002016-11-14T03:14:44.936-08:00Hi,
Getting below exception while executing the co...Hi,<br />Getting below exception while executing the code in above mentioned format:<br />Exception in thread "main" java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.setMetricDefaults(ITextFontResolver.java:679)<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.(Anonymoushttps://www.blogger.com/profile/13678600430669476475noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-54381220348716389352016-09-04T10:06:12.322-07:002016-09-04T10:06:12.322-07:00Hi Vivek ,
Can you please do let me know if you ...Hi Vivek ,<br /><br />Can you please do let me know if you got any solution?<br /><br />vdubey.p@gmail.com<br /><br />Thanks,<br />VedAnonymoushttps://www.blogger.com/profile/14556862966654723729noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-89060638909398870672016-09-04T10:03:27.843-07:002016-09-04T10:03:27.843-07:00Hi Amarendra I have used iText-2.0.8.jar but sti...Hi Amarendra I have used iText-2.0.8.jar but still getting same issue.Please guide..vdubey.p@gail.comAnonymoushttps://www.blogger.com/profile/14556862966654723729noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-62238999926125974062016-09-04T03:48:49.246-07:002016-09-04T03:48:49.246-07:00Exception in thread "main" java.lang.NoS...Exception in thread "main" java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(C)[I<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.setMetricDefaults(ITextFontResolver.java:679)<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.(ITextFontResolver.java:610)<br /> at org.xhtmlrenderer.pdf.ITextFontResolver.addCourier(Anonymoushttps://www.blogger.com/profile/14556862966654723729noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-87839197194436143492016-07-25T05:45:48.513-07:002016-07-25T05:45:48.513-07:00Hi,
I am using these all jars and everything is f...Hi,<br /><br />I am using these all jars and everything is fine and pdf generated successfully <br />but, when running same code on Windows10 then getting alignment issues (some contents comming in next page) which was fine when running in Windows7<br /><br />1) core-renderer.jar<br />2) core-renderer-minimal.jar<br />3) xml-apis-xerces-2.9.1.jar<br /><br />so, to execute on Windows10, I have to Anonymoushttps://www.blogger.com/profile/11952251685099173327noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-5162401616094061192015-07-28T14:50:21.096-07:002015-07-28T14:50:21.096-07:00it would be a useful example if you actually provi...it would be a useful example if you actually provided the libraries (as a download). Without those, it is just guess work because there is so many versions of those libraries out there that I cannot find the correct one.<br /><br />Unknownhttps://www.blogger.com/profile/16499948405076706176noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-31952425248565277442015-01-30T09:17:06.550-08:002015-01-30T09:17:06.550-08:00Hi! Thank you for a good article! I run your examp...Hi! Thank you for a good article! I run your example, but I get an error ERROR: 'Stream closed'<br />Exception in thread "main" org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). java.io.IOException: Stream closed<br /> at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:191)<br /> at Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-49525630349085020982013-09-20T12:00:46.931-07:002013-09-20T12:00:46.931-07:00I have a table on my page and sometimes, this tabl...I have a table on my page and sometimes, this table has just been cut in half by page transition. would like to avoid this? Anonymoushttps://www.blogger.com/profile/10683980773173369531noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-4547164764270639932013-06-18T23:37:10.607-07:002013-06-18T23:37:10.607-07:00hi..
i'm tried this example in android but it ...hi..<br />i'm tried this example in android but it will display error for "configure the build path"...so plz help me..<br /><br />The type com.lowagie.text.DocumentException cannot be resolved. It is indirectly referenced from required .class filesSumitPansuriyahttps://www.blogger.com/profile/06327002527928594252noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-15765527290267712092013-06-18T23:35:24.404-07:002013-06-18T23:35:24.404-07:00The type com.lowagie.text.DocumentException cannot...The type com.lowagie.text.DocumentException cannot be resolved. It is indirectly referenced from required .class filesSumitPansuriyahttps://www.blogger.com/profile/06327002527928594252noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-8703790670512340082013-06-05T04:02:56.671-07:002013-06-05T04:02:56.671-07:00Hello I am vivek yadav
I am working on grails and ...Hello I am vivek yadav<br />I am working on grails and using rendering plugin for generate pdf. behind the sceen it also use itext to create pdf. I want to add my own font how is it possible.<br />You can email me if you have any solution regarding this.<br />my email id is :<br />vivek@jellyfishtechnologies.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-68143061648540366652013-04-30T05:07:21.543-07:002013-04-30T05:07:21.543-07:00Exception in thread "main" java.lang.NoS...Exception in thread "main" java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(I)[I<br /><br />is due to improper iText jar version:<br /><br />use iText-2.0.8.jarAmarendrahttps://www.blogger.com/profile/07012743482583216669noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-47521667340217603332013-03-19T07:13:14.546-07:002013-03-19T07:13:14.546-07:00I have tried this code and I am getting the follow...I have tried this code and I am getting the following error: <br /><br />xception in thread "main" java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfTemplate<br /> at org.xhtmlrenderer.pdf.ITextRenderer.(ITextRenderer.java:108)<br /> at org.xhtmlrenderer.pdf.ITextRenderer.(ITextRenderer.java:102)<br /> at models.CreatePdf.main(CreatePdf.java:28)<br />Caused by: Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-43702200376648389742012-12-02T22:03:54.449-08:002012-12-02T22:03:54.449-08:00Hello, I tried your example and got the following ...Hello, I tried your example and got the following exception when converting my html document to pdf .<br /><br />Exception in thread "main" java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox(I)[I<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$FontDescription.setMetricDefaults(ITextFontResolver.java:696)<br /> at org.xhtmlrenderer.pdf.ITextFontResolver$Irfanhttps://www.blogger.com/profile/00848687944098783505noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-54987121509634513132012-11-07T00:44:27.155-08:002012-11-07T00:44:27.155-08:00HI.. I am Manju Vani
I tried ur exmaple its givin...HI.. I am Manju Vani<br /><br />I tried ur exmaple its giving the out put but it is giving the following error plz help me in resolving this error.<br /><br />java.io.IOException: Stream closed<br /> at java.io.BufferedInputStream.getInIfOpen(Unknown Source)<br /> at java.io.BufferedInputStream.read1(Unknown Source)<br /> at java.io.BufferedInputStream.read(Unknown Source)<br /> at Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-31453647440709221402012-11-04T06:32:25.587-08:002012-11-04T06:32:25.587-08:00I have been looking into this and it looks like yo...I have been looking into this and it looks like you must have a valid HTML. <br /><br /> usually there are rare cases where you have a 100% valid html.. <br /><br />so iText needs to be improved much more to really work in "real-life" production quality applications.<br /><br />for eg. if you try to use http://www.chinadaily.com/<br />it will fail with bunch of exceptions similar to allAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-7884793621388337482012-10-31T17:23:47.551-07:002012-10-31T17:23:47.551-07:00Does your HTML file reside in the same directory a...Does your HTML file reside in the same directory as your java code? Can you post the code please?YellowRosehttps://www.blogger.com/profile/10560194294208320006noreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-75830003583162878942012-10-31T05:00:31.688-07:002012-10-31T05:00:31.688-07:00now i have again try and using jdk 1.4 and i have ...now i have again try and using jdk 1.4 and i have download all the Jar file from your provided Location and getting the problem "Can't load the XML resource (using TRaX transformer). java.io.IOException: Stream closed"<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4129346287195722005.post-18169791663457963222012-10-30T19:06:36.324-07:002012-10-30T19:06:36.324-07:00@Naval, post your java version, version of jar fil...@Naval, post your java version, version of jar files and code. I will have a look.YellowRosehttps://www.blogger.com/profile/10560194294208320006noreply@blogger.com