allcolor / YaHP-Converter

YaHP is a Java library that allows you to convert an HTML document into a PDF document.
GNU Lesser General Public License v2.1
56 stars 23 forks source link

Can i use the java program as applet?? #21

Closed Jorgealb01 closed 10 years ago

Jorgealb01 commented 10 years ago

I have a Lotus Notes server 6.54 and just can use Java 1.3 and I can not load the YaHp_Converter I get version issues. So I would like to use as applet ... Is this possible ... Or do you have another solution ??

allcolor commented 10 years ago

Use it as applet ? You should not normally use it like that, you should instead use it inside a servlet which generates and sends the PDF... not on the client. But if your applet is signed and has access to the client hard disk... why not ? But I can't see a valid use case where you have to generate the PDF on the client instead of the server.

Regards, Quentin

2014-01-27 Jorgealb01 notifications@github.com

I have a Lotus Notes server 6.54 and just can use Java 1.3 and I can not load the YaHp_Converter I get version issues. So I would like to use as applet ... Is this possible ... Or do you have another solution ??

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21 .

All those moments will be lost in time, like tears in rain. (Roy Batty/Rutger Hauer)

Jorgealb01 commented 10 years ago

I ve tried to install the converter in the glassfish server in a bean, but the process can be completed , I recive in the consol the leyend just "after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree Finalizing classloader : rootLoader/main Finalizing classloader : rootLoader Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Closed #21.

— Reply to this email directly or view it on GitHub.

allcolor commented 10 years ago

If you use it in an app server, either you have to save an instance in a threadlocal variable, or you must create instance without using the internal classloader (new CYahpConverter(false)) and have all the required jar in the classpath.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean, but the process can be completed , I recive in the consol the leyend just "after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree Finalizing classloader : rootLoader/main Finalizing classloader : rootLoader Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Closed #21.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174 .

All those moments will be lost in time, like tears in rain. (Roy Batty/Rutger Hauer)

allcolor commented 10 years ago

Also I don't understand what you mean by "I don't receive the leyends".. what is a "leyends" ?

The convertToPDF method write the PDF in the given outputstream.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean, but the process can be completed , I recive in the consol the leyend just "after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree Finalizing classloader : rootLoader/main Finalizing classloader : rootLoader Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Closed #21.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174 .

All those moments will be lost in time, like tears in rain. (Roy Batty/Rutger Hauer)

Jorgealb01 commented 10 years ago

Can you be more specific ... I am not expert in Java .. tks

Date: Wed, 29 Jan 2014 10:57:46 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

If you use it in an app server, either you have to save an instance in a

threadlocal variable, or you must create instance without using the

internal classloader (new CYahpConverter(false)) and have all the required

jar in the classpath.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean, but

the process can be completed , I recive in the consol the leyend just

"after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree

Finalizing classloader : rootLoader/main

Finalizing classloader : rootLoader

Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Closed #21.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

— Reply to this email directly or view it on GitHub.

Jorgealb01 commented 10 years ago

I mean text at the end of the console

Date: Wed, 29 Jan 2014 10:59:54 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Also I don't understand what you mean by "I don't receive the leyends"..

what is a "leyends" ?

The convertToPDF method write the PDF in the given outputstream.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean, but

the process can be completed , I recive in the consol the leyend just

"after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree

Finalizing classloader : rootLoader/main

Finalizing classloader : rootLoader

Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Closed #21.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

— Reply to this email directly or view it on GitHub.

allcolor commented 10 years ago

It's as specific as it can be. Create the instance with false for the use classloader boolean and put all the jar in the class path. If you don't understand you better have to learn java first. Regards Le 31 janv. 2014 21:54, "Jorgealb01" notifications@github.com a écrit :

Can you be more specific ... I am not expert in Java .. tks

Date: Wed, 29 Jan 2014 10:57:46 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

If you use it in an app server, either you have to save an instance in a

threadlocal variable, or you must create instance without using the

internal classloader (new CYahpConverter(false)) and have all the required

jar in the classpath.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean, but

the process can be completed , I recive in the consol the leyend just

"after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree

Finalizing classloader : rootLoader/main

Finalizing classloader : rootLoader

Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Closed #21.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub< https://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33841502 .

Jorgealb01 commented 10 years ago

Tks for your help and your advice

Date: Sat, 1 Feb 2014 02:40:50 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

It's as specific as it can be. Create the instance with false for the use

classloader boolean and put all the jar in the class path. If you don't

understand you better have to learn java first. Regards

Le 31 janv. 2014 21:54, "Jorgealb01" notifications@github.com a écrit :

Can you be more specific ... I am not expert in Java .. tks

Date: Wed, 29 Jan 2014 10:57:46 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

If you use it in an app server, either you have to save an instance in a

threadlocal variable, or you must create instance without using the

internal classloader (new CYahpConverter(false)) and have all the required

jar in the classpath.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean,

but

the process can be completed , I recive in the consol the leyend just

"after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree

Finalizing classloader : rootLoader/main

Finalizing classloader : rootLoader

Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet??

(#21)

Closed #21.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub<

https://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33841502

.

— Reply to this email directly or view it on GitHub.

Jorgealb01 commented 10 years ago

I understand tat you said about the cahnges , but i have this issue in the console: log4j:WARN No appenders could be found for logger (org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.org.allcolor.yahp.converter.IHtmlToPdfTransformer$CConvertException: ERROR: An unhandled exception occured: org/bouncycastle/asn1/ASN1OctetString at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:792) at org.allcolor.yahp.converter.CYaHPConverter.convertToPdf(CYaHPConverter.java:172) at org.allcolor.yahp.cl.converter.PDF2.doGet(PDF2.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:744)Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1OctetString at com.lowagie.text.pdf.PdfEncryption.(Unknown Source) at com.lowagie.text.pdf.PdfWriter.setEncryption(Unknown Source) at com.lowagie.text.pdf.PdfWriter.setEncryption(Unknown Source) at org.allcolor.yahp.cl.converter.CDocumentReconstructor.reconstruct(CDocumentReconstructor.java:174) at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:783) ... 16 moreCaused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.ASN1OctetString at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

Can u help me pls .... Date: Sat, 1 Feb 2014 02:40:50 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

It's as specific as it can be. Create the instance with false for the use

classloader boolean and put all the jar in the class path. If you don't

understand you better have to learn java first. Regards

Le 31 janv. 2014 21:54, "Jorgealb01" notifications@github.com a écrit :

Can you be more specific ... I am not expert in Java .. tks

Date: Wed, 29 Jan 2014 10:57:46 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

If you use it in an app server, either you have to save an instance in a

threadlocal variable, or you must create instance without using the

internal classloader (new CYahpConverter(false)) and have all the required

jar in the classpath.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean,

but

the process can be completed , I recive in the consol the leyend just

"after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree

Finalizing classloader : rootLoader/main

Finalizing classloader : rootLoader

Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet??

(#21)

Closed #21.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub<

https://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33841502

.

— Reply to this email directly or view it on GitHub.

allcolor commented 10 years ago

You must have the bouncycastle jars in the classpath to use encryption:

http://bouncycastle.org/latest_releases.html

Regards

2014-02-03 Jorgealb01 notifications@github.com:

I understand tat you said about the cahnges , but i have this issue in the console: log4j:WARN No appenders could be found for logger (org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.org.allcolor.yahp.converter.IHtmlToPdfTransformer$CConvertException: ERROR: An unhandled exception occured: org/bouncycastle/asn1/ASN1OctetString at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:792) at org.allcolor.yahp.converter.CYaHPConverter.convertToPdf(CYaHPConverter.java:172) at org.allcolor.yahp.cl.converter.PDF2.doGet(PDF2.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:744)Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1OctetString at com.lowagie.text.pdf.PdfEncryption.(Unknown Source) at com.lowagie.text.pdf.PdfWriter.setEncryption(Unknown Source) at com.lowagie.text.pdf.PdfWriter.setEncryption(Unknown Source) at org.allcolor.yahp.cl.converter.CDocumentReconstructor.reconstruct(CDocumentReconstructor.java:174) at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:783) ... 16 moreCaused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.ASN1OctetString at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

Can u help me pls .... Date: Sat, 1 Feb 2014 02:40:50 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

It's as specific as it can be. Create the instance with false for the use

classloader boolean and put all the jar in the class path. If you don't

understand you better have to learn java first. Regards

Le 31 janv. 2014 21:54, "Jorgealb01" notifications@github.com a écrit :

Can you be more specific ... I am not expert in Java .. tks

Date: Wed, 29 Jan 2014 10:57:46 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

If you use it in an app server, either you have to save an instance in a

threadlocal variable, or you must create instance without using the

internal classloader (new CYahpConverter(false)) and have all the required

jar in the classpath.

Quentin

2014-01-29 Jorgealb01 notifications@github.com

I ve tried to install the converter in the glassfish server in a bean,

but

the process can be completed , I recive in the consol the leyend just

"after conversion", but I dont receive the leyends:

Destroying YAHP ClassLoader Tree

Finalizing classloader : rootLoader/main

Finalizing classloader : rootLoader

Destroying YAHP ClassLoader Tree : done

So d you have any idea why this happen ?

Date: Tue, 28 Jan 2014 06:35:56 -0800

From: notifications@github.com

To: YaHP-Converter@noreply.github.com

CC: jorgealb01@hotmail.com

Subject: Re: [YaHP-Converter] Can i use the java program as applet??

(#21)

Closed #21.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub<

https://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33605174

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub< https://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33841502

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-33922290 .

All those moments will be lost in time, like tears in rain. (Roy Batty/Rutger Hauer)

Jorgealb01 commented 10 years ago

Tks for you great help..... The program is running now ok.... When I put the next http address in order to get the pdf files . http://www.google.comhttp://www.amazon.com The program works OK But when I use a local server the program running ok in some pages like: http://192.168.100.7/ad/adsw/hr/objetivo_01.nsf/ec17caee7b19803986257b82005313da

But when I put the next page http://192.168.100.7/ad/adsw/hr/objetivo_01.nsf/ec17caee7b19803986257b82005313da/7ddc434ed324fc1586257b9e0024fff1?OpenDocument I get the next error:

org.allcolor.yahp.converter.IHtmlToPdfTransformer$CConvertException: ERROR: An unhandled exception occured: A document can have only one root node. at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:791) at org.allcolor.yahp.converter.CYaHPConverter.convertToPdf(CYaHPConverter.java:172) at org.allcolor.yahp.sample.CSimpleConversion.main(CSimpleConversion.java:133)Caused by: org.w3c.dom.DOMException: A document can have only one root node. at org.allcolor.xml.parser.dom.ANode.insertBefore(ANode.java:1235) at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.convertInputToVisibleHTML(CHtmlToPdfFlyingSaucerTransformer.java:309) at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:588) ... 2 moreAn error occurs while converting 'http://192.168.100.7/ad/adsw/hr/objetivo_01.nsf/ec17caee7b19803986257b82005313da/7ddc434ed324fc1586257b9e0024fff1?OpenDocument' to '/home/jorgealb01/pdf100.pdf'. Cause : ERROR: An unhandled exception occured: A document can have only one root node.

Can yo help me one more time pls.....

allcolor commented 10 years ago

Hi,

could you send me the html that generates this exception ?

Please note, that to have the best result, you should try to give mostly correct html, avoid tag soup... while tag soup should in most case work, sometimes it does not, if you send me the problematic html, I can take a look.

Regards, Quentin Anciaux

2014-02-05 Jorgealb01 notifications@github.com:

Tks for you great help..... The program is running now ok.... When I put the next http address in order to get the pdf files . http://www.google.comhttp://www.amazon.com The program works OK But when I use a local server the program running ok in some pages like:

http://192.168.100.7/ad/adsw/hr/objetivo_01.nsf/ec17caee7b19803986257b82005313da

But when I put the next page

http://192.168.100.7/ad/adsw/hr/objetivo_01.nsf/ec17caee7b19803986257b82005313da/7ddc434ed324fc1586257b9e0024fff1?OpenDocument I get the next error:

org.allcolor.yahp.converter.IHtmlToPdfTransformer$CConvertException: ERROR: An unhandled exception occured: A document can have only one root node. at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:791) at org.allcolor.yahp.converter.CYaHPConverter.convertToPdf(CYaHPConverter.java:172) at org.allcolor.yahp.sample.CSimpleConversion.main(CSimpleConversion.java:133)Caused by: org.w3c.dom.DOMException: A document can have only one root node. at org.allcolor.xml.parser.dom.ANode.insertBefore(ANode.java:1235) at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.convertInputToVisibleHTML(CHtmlToPdfFlyingSaucerTransformer.java:309) at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:588) ... 2 moreAn error occurs while converting ' http://192.168.100.7/ad/adsw/hr/objetivo_01.nsf/ec17caee7b19803986257b82005313da/7ddc434ed324fc1586257b9e0024fff1? OpenDocument' to '/home/jorgealb01/pdf100.pdf'. Cause : ERROR: An unhandled exception occured: A document can have only one root node.

Can yo help me one more time pls.....

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-34146421 .

All those moments will be lost in time, like tears in rain. (Roy Batty/Rutger Hauer)

Jorgealb01 commented 10 years ago

HI: I have a problem when I use the applet because I can not access to the local machine ...How can I do in order to show the PDF in the applet screen. I dont want save the pdf file just show it in the applet window is it possible ??

allcolor commented 10 years ago

Hi, You have to sign the applet to have local access... But as I said, normally you use the library on the server and send the generated pdf via simple http download (content-disposition either attachment or inline) and let the browser select the application to open the PDF.

Regards, Quentin Anciaux

2014-02-18 18:08 GMT+01:00 Jorgealb01 notifications@github.com:

HI: I have a problem when I use the applet because I can not access to the local machine ...How can I do in order to show the PDF in the applet screen. I dont want save the pdf file just show it in the applet window is it possible ??

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-35407353 .

All those moments will be lost in time, like tears in rain. (Roy Batty/Rutger Hauer)

Jorgealb01 commented 10 years ago

The problem that i have is that the Lotus Domino Server just accept the java 1.3 version ... is so old .. .... ooppsss.. and when i try to load the libraries I get an error for the version ... Do you know another option in order to run this program ?? Date: Tue, 18 Feb 2014 10:02:23 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Hi,

You have to sign the applet to have local access... But as I said, normally

you use the library on the server and send the generated pdf via simple

http download (content-disposition either attachment or inline) and let the

browser select the application to open the PDF.

Regards,

Quentin Anciaux

2014-02-18 18:08 GMT+01:00 Jorgealb01 notifications@github.com:

HI:

I have a problem when I use the applet because I can not access to the

local machine ...How can I do in order to show the PDF in the applet

screen.

I dont want save the pdf file just show it in the applet window is it

possible ??

Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-35407353

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

— Reply to this email directly or view it on GitHub.

allcolor commented 10 years ago

You run it on a web app server like tomcat, and you generate the pdf via a servlet... or you create a command line app, you call the app from whatever framework you have on the server and send the resulting pdf via http...

But running it on the client seems strange... but if you want to, you have to sign the applet with a valid certificate.

Regards, Quentin Anciaux

2014-02-18 19:13 GMT+01:00 Jorgealb01 notifications@github.com:

The problem that i have is that the Lotus Domino Server just accept the java 1.3 version ... is so old .. .... ooppsss.. and when i try to load the libraries I get an error for the version ... Do you know another option in order to run this program ?? Date: Tue, 18 Feb 2014 10:02:23 -0800 From: notifications@github.com To: YaHP-Converter@noreply.github.com CC: jorgealb01@hotmail.com Subject: Re: [YaHP-Converter] Can i use the java program as applet?? (#21)

Hi,

You have to sign the applet to have local access... But as I said, normally

you use the library on the server and send the generated pdf via simple

http download (content-disposition either attachment or inline) and let the

browser select the application to open the PDF.

Regards,

Quentin Anciaux

2014-02-18 18:08 GMT+01:00 Jorgealb01 notifications@github.com:

HI:

I have a problem when I use the applet because I can not access to the

local machine ...How can I do in order to show the PDF in the applet

screen.

I dont want save the pdf file just show it in the applet window is it

possible ??

Reply to this email directly or view it on GitHub< https://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-35407353

.

All those moments will be lost in time, like tears in rain. (Roy

Batty/Rutger Hauer)

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-35414849 .

All those moments will be lost in time, like tears in rain. (Roy Batty/Rutger Hauer)

Jorgealb01 commented 10 years ago

When I use the converter to PDF I have an issue , because I have the web page in Spanish. The issue is that the conversion delete some letters, for example The right word is Documentación But with the conversion I get Documentacin (delete the letter ó) Can you help me pls

............... BEST REGARDS ..

Jorgealb01 commented 10 years ago

From: jorgealb01@hotmail.com To: reply@reply.github.com Subject: One more question Date: Tue, 4 Mar 2014 04:48:24 -0600

When I use the converter to PDF I have an issue , because I have the web page in Spanish. The issue is that the conversion delete some letters, for example The right word is Documentación But with the conversion I get Documentacin (delete the letter ó) Can you help me pls

............... BEST REGARDS ..

allcolor commented 10 years ago

Hi, you have to embed the font. For this you must refetence the path to a directory containing the fonts truetype you want to embed and explicitly use them in your html via font family css. Regards Le 9 mars 2014 03:57, "Jorgealb01" notifications@github.com a écrit :

From: jorgealb01@hotmail.com To: reply@reply.github.com Subject: One more question Date: Tue, 4 Mar 2014 04:48:24 -0600

When I use the converter to PDF I have an issue , because I have the web page in Spanish. The issue is that the conversion delete some letters, for example The right word is Documentación But with the conversion I get Documentacin (delete the letter ó) Can you help me pls

............... BEST REGARDS ..

— Reply to this email directly or view it on GitHubhttps://github.com/allcolor/YaHP-Converter/issues/21#issuecomment-37117550 .