Free Support Forum - aspose.com

re:Aspose.Pdf.Facades.FontStyle

hello

can is it possible to set the font style as “arial” with below method
stamp.BindLogo(new FormattedText(str, System.Drawing.Color.Black, System.Drawing.Color.White, Aspose.Pdf.Facades.FontStyle.TimesItalic , EncodingType.Winansi, true, 12));


Hi Laxman,


Thanks for your inquiry. Yes you can use Arial font style as following.

stamp.BindLogo(new FormattedText(str, System.Drawing.Color.Blue, System.Drawing.Color.Gray, “Arial”, EncodingType.Winansi, true, 12));

Please feel free to contact us for any further assistance.

Best Regards,
<span style="font-size:11.0pt;font-family: <p>“Calibri”,“sans-serif”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:<br> minor-latin;mso-ansi-language:EN-GB;mso-fareast-language:EN-US;mso-bidi-language:<br> AR-SA" lang=“EN-GB”>when i am passing “Arial” or another font style its always<br> writing "MS Gothic " font please Update ASAP</span><!–[if gte mso 10]></p> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–>


This message was posted using Email2Forum by shahzad.latif.

Hi Laxman,


I have tested the scenario using following code snippet with Aspose.Pdf for .NET 7.7.0 and as per my observations, the resultant file contains text in Arial font. Can you please confirm which version of Aspose.Pdf you are using ?

We are sorry for this inconvenience.

[C#]

//open document<o:p></o:p>

PdfFileStamp fileStamp = new PdfFileStamp("c:/pdftest/PrintableDocument.pdf", "c:/pdftest/PrintableDocument_output.pdf");

//create stamp

Aspose.Pdf.Facades.Stamp stamp = new Aspose.Pdf.Facades.Stamp();

stamp.BindLogo(new FormattedText("Hello World!", System.Drawing.Color.Blue, System.Drawing.Color.Gray, "Arial", EncodingType.Winansi, true, 14));

stamp.SetOrigin(200, 200);

stamp.Rotation = 90.0F;

stamp.IsBackground = true;

//add stamp to PDF file

fileStamp.AddStamp(stamp);

//save updated PDF file

fileStamp.Close();