We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text-transform css property not supported while converting from HTML to PDF

Hi ,

I am trying to generate PDF document from a html file .
But in the output the CSS property “text-transform:uppercase” is not applied .

Input Sample:

1. PRODUCTNAAM / PRODUCTNAME
nl NL
EN Peanuts with chocola
FR Pinda au chocolat
DE Erdnusse mit choclat
ES Pindos Chocolatos


Output Sample:
HEMA
1. PRODUCTNAAM / PRODUCTNAME
nl NL
EN Peanuts with chocola
FR Pinda au chocolat
DE Erdnusse mit choclat
ES Pindos Chocolatos

For more details i have attached my input HTML and output PDF file .

here is my code to convert the HTMl to PDF
Aspose.Pdf.Generator.Text text2 = new Aspose.Pdf.Generator.Text(section, r.ReadToEnd()); text2.IsHtmlTagSupported = true;
section.Paragraphs.Add(text2);
pdfObject.Save(destination);

Please let us know the cause of this issue .

Thanks
AgilePoint Development Team

Hi Roupya,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 11.5.0 where I have following code snippet based on new Document Object Model of Aspose.Pdf namespace and I am unable to notice above stated issue. For your reference, I have also attached the output generated over my end.

[C#]

Aspose.Pdf.Document doc1 = new Aspose.Pdf.Document(@“c:/pdftest/Input
(2).html”
, new Aspose.Pdf.HtmlLoadOptions());<o:p></o:p>

doc1.Save(@“c:/pdftest/Converted_Input_file.pdf”);

Thanks Team .

I used the code provided by you and it worked fine for me .

Issue was coming for my before approach using Aspose.Pdf.Generator .

Pdf pdfObject = new Pdf();
Aspose.Pdf.Generator.Section section = pdfObject.Sections.Add();
Aspose.Pdf.Generator.Text text2 = new Aspose.Pdf.Generator.Text(section, r.ReadToEnd()); text2.IsHtmlTagSupported = true;
section.Paragraphs.Add(text2);
pdfObject.Save(destination);

Thanks
Roupya
AgilePoint Support Team

Hi Roupya,


Thanks for your feedback. It is good to know that you have managed to resolve the issue with suggested code.

Please keep using our API and feel free to contact us for any further query or concern, we will be more than happy to extend our support.

Best Regards,