We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

PDF generation with partial HTML content - suggestions?

Hello,

I'm currently using the PDF component within an ASP.NET application that, amongst other things, generates quotes as PDF. Currently, the user enters each quote line item as plain text which is saved to a database and included in the quote PDF when generated.

The user has requested the ability to format the text using tabs, bold, italic etc. This poses a couple of questions. How do I allow them to enter this via their browser and how do I render this to the PDF?

I've been thinking along the lines of allowing the user to input the text using an HTML editor such as the one within the AJAX toolkit (http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HTMLEditor/HTMLEditor.aspx) but I'm not sure if it's possible to output this reliably within the PDF.

I know I can render a whole HTML page to a PDF, but can I display blocks of HTML cleanly within the PDF?

Thanks,
Dave

1 Reply

MR Meiyappan R Syncfusion Team March 3, 2010 06:26 AM UTC

Hi Dave,

Thank you for your interest in syncfusion products.

Could you please look into the below sample which illustrates the text rendering in PDF from the browser input.

http://help.syncfusion.com/samples/pdf/PDF_Browser%20input/main.htm

But it has certain limitations.

1.Only single font type is used at a instant.

2.If a large text is given as an input the subsequent input text will be in the next line.

If you want to use multiple font rendering at the same instant you can use our RTFToPDF or HTMLToPDF feature provided in our product.

For RTFToPDF sample please look into the following link.

http://samples.syncfusion.com/ASPNET/8.1.0.26/web/Pdf.Web/samples/3.5/Product%20Showcase/RTFSupport/CS/Default.aspx?args=0

For HTMLToPDF sample please look into the following link.

http://samples.syncfusion.com/ASPNET/8.1.0.26/web/Pdf.Web/samples/3.5/Importing/HtmlToPdf/CS/Default.aspx?args=7

Kindly let us know if you have any queries.

Regards
Meiyappan

Loader.
Live Chat Icon For mobile
Up arrow icon