We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Adding a cutom font and dashed line

Thread ID:

Created:

Updated:

Platform:

Replies:

117171 Aug 27,2014 10:21 PM Sep 4,2014 12:36 AM Windows Phone 3
loading
Tags: PDF
Coder
Asked On August 27, 2014 10:21 PM

Hi,

I'm back again with two questions.

First question:
I have been trying to figure out all day today how to add a custom font to a PDF. In the code sample, you have the following:

PdfTextElement txtElement = new PdfTextElement(text);
txtElement.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 24)

How can I change the font to one that I've personally added into the project? (For example, Elephant font is one font I'd like to render to PDF.)


Second question:
Would it be possible to provide a quick code sample on how to create a dashed line? I'd like that line to divide my header and the main body.

Thanks for any help you can provide; as you can tell, I'm a newbie grasping my way around these controls..!

Praveenkumar H [Syncfusion]
Replied On September 2, 2014 01:05 AM

Hi Coder,

Thank you for using syncfusion products,

First question:

Currently we don't have the support for using the custom font , we have already logged the feature request "Need add the support to use custom font in Windows phone platform". we will update you once the feature has been implemented.

Second question:

We can draw dashed line as follow,

PdfPen pen = new PdfPen(PdfBrushes.Red);

pen.DashStyle = PdfDashStyle.Dash;

page.Graphics.DrawLine(pen, new PointF(10, 10), new PointF(100, 10));

Please let us know if you need further assistance.

With Regards,

Praveen


Coder
Replied On September 2, 2014 06:19 PM

Hi Praveeen,

Thank you very much for your assistance! Looking forward to seeing those features implemented in the future.

Praveenkumar H [Syncfusion]
Replied On September 4, 2014 12:36 AM

Hi,

Thank you for your update,

We will update you once the feature has been implemented.

With Regards,

Praveen


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;