Is it possible to use custom font styles?

Hi,

I have a set of styles like the following:

{
style1 : “arial 24px bold”,
style2 : “arial 12px italics”,

}

in order to print text in PDF (using the XML binding approach), we use something like the following fragment:


<Segment FontName=“Arial” FontSize=“12” …>
Hello, this is text in PDF.



Is it possible to add the font style in the declared by using the custom style names (like style1 or style2 declared above)?

So, in effect to have something like the following fragment:



Hello, this is text in PDF.


Hi Giorgos,


Thanks for contacting support.

As per my understanding, you need to have some scenario where you can specify the text formatting against style attributes and when creating text segments, you can call style and associated properties (formatting attributes) are assigned to Segment object. If so is the case, then I am sorry to inform you that this approach is not support by Aspose.Pdf for .NET. When creating Segment/Text objects, you need to explicitly specify the formatting information for these objects.

In case of any further query, please feel free to contact. We are sorry for your inconvenience.