We have HTML text in following languages, do you know that Aspose.pdf product supports different languages.
List of languages are :
German
Dutch
Spanish
Korean
Japanese
Traditional Chinese
Simple Chinese
Spanish
Portugese
We have HTML text in following languages, do you know that Aspose.pdf product supports different languages.
List of languages are :
German
Dutch
Spanish
Korean
Japanese
Traditional Chinese
Simple Chinese
Spanish
Portugese
Hi Pankaj,
Thanks for contacting support.
Aspose.Pdf for .NET supports multiple languages while creating PDF document. Please try using following code snippet to convert HTML files to PDF format and in case you encounter any issue, please share the resource HTML so that we can test the scenario at our end.
[C#]
// load input HTML
Document pdfDocument = new Document("c:/pdftest/sample.html", new HtmlLoadOptions());
// save output in PDF format
pdfDocument.Save(“c:/pdftest/Multi-Language.pdf”);<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>
<![endif]–>
Besides this, you may also consider reading HTML contents inside String object, add HTML string to PDF file and while adding HTML to PDF. For further details, please visit Add HTML String using DOM
Thanks for the reply. Please let me know if your aspose.pdf product can support the mentioned languages.
Hi Pankaj,
Dim textdoc As Document = New Document()<o:p></o:p>
Dim page As Page = textdoc.Pages.Add()
'Chinese
Dim textc As Aspose.Pdf.HtmlFragment = New Aspose.Pdf.HtmlFragment(" The Chinese Text Project (CTP; Chinese: 中國哲學書電子化計劃) is a digital library project")
'German text
Dim textg As Aspose.Pdf.Text.TextFragment = New Aspose.Pdf.Text.TextFragment("Es war ein super-schwüller Tag. Wir konnten die Hitze kaum ertragen und entschlossen ")
'Set text properties
textg.TextState.FontSize = 8
textg.TextState.Font = Aspose.Pdf.Text.FontRepository.FindFont("Arial Unicode MS")
'Japanese text
Dim textj As Aspose.Pdf.HtmlFragment = New Aspose.Pdf.HtmlFragment(" ラドクリフ、マラソン五輪代表に 1万m出場にも含み")
'Set text properties
'Add a new text paragraph in paragraphs collection and pass the TextFramment object
page.Paragraphs.Add(textc)
page.Paragraphs.Add(textj)
page.Paragraphs.Add(textg)
'Save resultant PDF file
textdoc.Save("c:/pdftest/Multi-Language_TextPDF.pdf")