I have both html content and string content, so which class I can use to render both in aspose pdf c#. Please do needful.
Can you please share your sample text in .txt file? We need to check further whether it is possible to render that mixed string in the PDF accordingly or not.
Chinese text to render : 请点击条款和条件复选框
html text to render:
""<html><body><div><input type='checkbox' /></div></body></html>"" try add one checkbox beside the chinese text.
I want to render it in the same line both the content.
text.zip (206 Bytes)
We tried to achieve your requirements using below code but it did not help:
string plainText = "请点击条款和条件复选框"; string htmlText = "<html><body><div><input type='checkbox' /></div></body></html>"; HtmlFragment htmlFragment = new HtmlFragment(plainText + htmlText); Document doc = new Document(); Page page = doc.Pages.Add(); page.Paragraphs.Add(htmlFragment); doc.Save(dataDir + "Text.pdf");
Therefore, an investigation ticket as PDFNET-51750 has been logged in our issue tracking system. We will further look into its details and keep you posted with the status of ticket resolution. Please be patient and spare us some time.
We are sorry for the inconvenience.
Could you please provide ETA for the fix. we are moving the changes to production environment soon. Please do needful.
At the moment, there is no such class in the API that can be used to add both plain and HTML text in the PDF document. It also looks difficult to implement such functionality. You would need to initialize two different instances for plain and HTML String separately. However, we will surely investigate the ticket on a first come first serve basis and let you know as soon as we make some significant progress towards its resolution. Please be patient and spare us some time.