Create pdf in asp.net (vb)

Posted by Ubuser under ASP.NET on 7/6/2011 | Points: 10 | Views : 11981 | Status : [Member] | Replies : 5
Hello,
I am trying to create pdf page using asp.net (vb).
I looked at http://www.dotnetfunda.com/tutorials/videos/x72-pdf-generator-in-net--dynamically-generate-pdf-in-aspnet-.aspx link and I can duplicate what is given there. But, when I try to create my own page, it throws errorUnable to cast object of type 'iTextSharp.text.html.simpleparser.CellWrapper' to type 'iTextSharp.text.Paragraph'."

I need help resolving this issue.

Thanks.

ubuser




Responses

Posted by: SheoNarayan on: 7/7/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
As long as you are using approach of this article http://www.dotnetfunda.com/articles/article977-pdf-generator-in-net--dynamically-generate-pdf-in-aspnet-.aspx and your aspx page is coded properly without any missing closing tag or poorly formatted HTML, it should work.

Have a look at the HTML you are getting as output and see if they are formed properly.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Ubuser, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 7/7/2011 [Member] Starter | Points: 25

Up
0
Down
Refer this

http://www.ciansoft.com/samples/pbxvbnet.htm

Thanks&Regards
LakshmiNarayana Nalluri.

Ubuser, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 7/7/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,

refer this link,

http://www.dotnetspark.com/kb/654-simple-way-to-create-pdf-document-using.aspx

Regards,
Susan

Ubuser, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ubuser on: 7/8/2011 [Member] Starter | Points: 25

Up
0
Down
I was able to get thru error. Error was due to link within document which I removed with regex.

Now I get pdf, but not in proper format. The table cell data gets wrapped.
I am trying to add style with LoadTagStyle and style class with LoadStyle method, but did not seem working. Also, when I specify page as LETTER_LANDSCAPE, it still goes Portrait.

Is there a way to add external stylesheet?

Thank you in advance and appreciate your response.
ubuser

Ubuser, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 7/12/2011 [Member] Starter | Points: 25

Up
0
Down
Refer this

http://forums.asp.net/t/1095048.aspx/1

Thanks&Regards
LakshmiNarayana Nalluri.

Ubuser, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response