Discussion:
[iText-questions] HTML to PDF
Hugh McLaughlin
2012-05-16 21:13:23 UTC
Permalink
Hello Everyone and thanks for your help in advance. I am using
iTextSharp 5.1.2.0 and want to convert HTML to PDF. I am going through
the documentation and numerous posts. I attempted to utilize the HTML
parser without success. It appears the solution is very dependent on
the version of iTextSharp. Would someone be able to point me in the
right direction? Any help would be greatly appreciated.
1T3XT BVBA
2012-05-17 07:55:33 UTC
Permalink
Post by Hugh McLaughlin
Hello Everyone and thanks for your help in advance. I am using
iTextSharp 5.1.2.0 and want to convert HTML to PDF. I am going
through the documentation and numerous posts. I attempted to utilize
the HTML parser without success. It appears the solution is very
dependent on the version of iTextSharp. Would someone be able to
point me in the right direction?
Not sure what you mean by HTML parser. If this is about HTMLWorker,
please switch to XML Worker. See http://itextpdf.com/summit.php#talk3
for more info. If this is about XML Worker, please clarify.
Hugh McLaughlin
2012-05-17 21:47:38 UTC
Permalink
Ok, I've switched over to XMLWorker, and studied the documentation and
example at:



http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html



However, I receive an error on the first line:



Dim HtmlContext As HtmlPipelineContext = New HtmlPipelineContext()



I'm using itext.xmlworker 1.1.3 with VB in VS 2010. The rest of the
sample code gives me no compiler errors. What am I not understanding?



From: 1T3XT BVBA [mailto:***@1t3xt.info]
Sent: Thursday, May 17, 2012 3:56 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] HTML to PDF



On 16/05/2012 23:13, Hugh McLaughlin wrote:

Hello Everyone and thanks for your help in advance. I am using
iTextSharp 5.1.2.0 and want to convert HTML to PDF. I am going through
the documentation and numerous posts. I attempted to utilize the HTML
parser without success. It appears the solution is very dependent on
the version of iTextSharp. Would someone be able to point me in the
right direction?

Not sure what you mean by HTML parser. If this is about HTMLWorker,
please switch to XML Worker. See http://itextpdf.com/summit.php#talk3
for more info. If this is about XML Worker, please clarify.
Alexis Pigeon
2012-05-17 22:23:37 UTC
Permalink
Hi Hugh,
Ok, I’ve switched over to XMLWorker, and studied the documentation and
example at:****
** **
http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html****
** **
However, I receive an error on the first line:****
** **
Dim HtmlContext As HtmlPipelineContext = New HtmlPipelineContext()****
** **
I’m using itext.xmlworker 1.1.3 with VB in VS 2010. The rest of the
sample code gives me no compiler errors. What am I not understanding?
What is the error?

Cheers,
alexis
Hugh McLaughlin
2012-05-18 11:22:57 UTC
Permalink
The New HTMLPipelineContext()is looking for an argument CssAppliers.



From: Alexis Pigeon [mailto:***@gmail.com]
Sent: Thursday, May 17, 2012 6:24 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] HTML to PDF



Hi Hugh,

On 17 May 2012 23:47, Hugh McLaughlin <***@kmcnetwork.com> wrote:

Ok, I’ve switched over to XMLWorker, and studied the documentation and example at:



http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html



However, I receive an error on the first line:



Dim HtmlContext As HtmlPipelineContext = New HtmlPipelineContext()



I’m using itext.xmlworker 1.1.3 with VB in VS 2010. The rest of the sample code gives me no compiler errors. What am I not understanding?


What is the error?


Cheers,
alexis

1T3XT BVBA
2012-05-18 06:18:00 UTC
Permalink
Post by Hugh McLaughlin
Ok, I've switched over to XMLWorker, and studied the documentation and
http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html
Dim HtmlContext As HtmlPipelineContext = New HtmlPipelineContext()
I'm using itext.xmlworker 1.1.3 with VB in VS 2010. The rest of the
sample code gives me no compiler errors. What am I not understanding?
The documentation wasn't updated to XML Worker 1.1.3.
HtmlPipelineContext now needs a parameter:
http://api.itextpdf.com/xml/com/itextpdf/tool/xml/pipeline/html/HtmlPipelineContext.html
Loading...