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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding a cutom font and dashed line

Thread ID:

Created:

Updated:

Platform:

Replies:

117171 Aug 28,2014 02:21 AM UTC Sep 4,2014 04:36 AM UTC Windows Phone 3
loading
Tags: PDF
Coder
Asked On August 28, 2014 02:21 AM UTC

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 05:05 AM UTC

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 10:19 PM UTC

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 04:36 AM UTC

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.

Warning Icon 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.Close Icon

;