aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Problem with html pdf converter api YaHP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Problem with html pdf converter api YaHP" Watch "Problem with html pdf converter api YaHP" New topic
Author

Problem with html pdf converter api YaHP

michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204
Hi

I am currently trying on a html to pdf converter called YaHP at
http://freshmeat.net/projects/yahpconverter/?branch_id=60569&release_id=222614

I tried to build the sample provided and its ok. Problem is when running it comes out error below:
before conversion
Apr 4, 2006 11:26:49 AM org.allcolor.yahp.cl.converter.swing.CSwingHtmlRenderer renderToPDF
INFO: begin pdf render page 1/1
log4j:WARN No appenders could be found for logger (org.apache.fop.pdf.PDFObject).
log4j:WARN Please initialize the log4j system properly.
Apr 4, 2006 11:26:51 AM org.allcolor.yahp.cl.converter.swing.CSwingHtmlRenderer renderToPDF
INFO: end pdf render page 1/1 time : 1656ms.
An error occurs while converting 'file:///D:/s.html' to 'D:/to1.pdf'. Cause : com/lowagie/text/pdf/PdfDocument$PdfCatalog
java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfDocument$PdfCatalog
at org.allcolor.yahp.cl.converter.swing.CSwingHtmlRenderer.renderToPDF(CSwingHtmlRenderer.java:271)
at org.allcolor.yahp.cl.converter.CHtmlToPdfSwingTransformer.transform(CHtmlToPdfSwingTransformer.java:76)
at org.allcolor.yahp.converter.CYaHPConverter.convertToPdf(CYaHPConverter.java:146)
at org.allcolor.yahp.sample.CSimpleConversion.main(CSimpleConversion.java:153)

Has anyone tried this converter before? I know that this not very popular api but its worth a shot asking here. By the way I am using windows machine to build this and the api is developed in unix platform. But this shouldnt' pose any problems. I have even use the latest iText lib but still same problem here.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18985
    
    8

Looks like you don't have the iText PDF library in your classpath. I went to the trouble of looking at the download. It has a "lib" directory with about a dozen jar files in it. I don't see any installation or setup instructions but it's pretty clear to me that those jar files are all supposed to go in your classpath.
michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204
Thanks for the reply. I have already included the whole bunch of jars into the path. I am using eclipse to run it and still its same problem. Whether I build it from the sample or compile using the source code. Seems that the source of the error is from the file org.allcolor.yahp.cl.converter.swing.CSwingHtmlRenderer.renderToPDF.
michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204
Hi again

Got the thing working. The author of the program just uploaded a new version 0.19 that works on jvm1.4 . I think thats the problem I have been facing all along. Check out the website and download the new version. But still got a little error coming out on the log4j part but the things working anyway.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with html pdf converter api YaHP