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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PdfTrueTypeFont in Partial Trust

Thread ID:

Created:

Updated:

Platform:

Replies:

91763 Dec 1,2009 02:50 PM UTC Feb 13,2012 01:26 PM UTC ASP.NET Web Forms (Classic) 8
loading
Tags: PDF
Mark Renwick
Asked On December 1, 2009 02:50 PM UTC

Hi, I am trying to use True Type Fonts and I have the following DLLs.

Syncfusion.Compression.Base.dll
Syncfusion.Core.dll
Syncfusion.Pdf.Web.dll

The code is ...

Font f = new Font("Arial", 12);
PdfTrueTypeFont font = new PdfTrueTypeFont(f, false);

Trying to use PdfTrueTypeFont gives the following error ...

"Syncfusion.Pdf.Graphics.PdfTrueTypeFont is inaccessible due to its protection level"

If I replace Syncfusion.Pdf.Web.dll with Syncfusion.Pdf.Base.dll then it works and compiles.

However the hosting enviroment is Medium trust and I believe that only Syncfusion.Pdf.Web.dll works in Medium trust, is this correct?

Can I use Syncfusion.Pdf.Base.dll in Medium trust?

Thanks

Mark

Meiyappan R [Syncfusion]
Replied On December 2, 2009 07:05 AM UTC

Hi Mark,
Thanks for your interest in Essential Pdf.
If the Syncfusion assemblies are present in global assemblies you can use Syncfusion.pdf.Base.But if the assemblies are in the applications bin folder then you should use only syncfusion.pdf.web.Currently we dont have the feature of supporting TrueTypeFonts in Syncfusion.pdf.web.dll.We have directed this issue to our developement team,once this feature is added we will get back to you.

Thanks
Meiyappan.R

Mark Renwick
Replied On December 2, 2009 10:11 AM UTC

In the example code I see that you simply specify the font name.

Does the font need to reside within a specific folder?

Or does it need to actually installed on the server?

Thanks
Mark

Meiyappan R [Syncfusion]
Replied On December 2, 2009 10:18 AM UTC

Hi Mark,
Its enough if you have the font installed in the server,not necessary to keep in the project folder.

Thanks
Meiyappan.R

Mark Renwick
Replied On December 2, 2009 10:44 AM UTC

If it's not installed on the server, where would it go within the folder structure.

Is there is a specific folder? I can't see anything about it in the examples.

Thanks
Mark

Meiyappan R [Syncfusion]
Replied On December 3, 2009 07:02 AM UTC

Hi Mark,
Thanks for your continuous interest in Syncfusion products.
If you are copying the code and running on your system it will look in the fonts folder in the control panel,If its not installed it will post an exception,It will not look into any bin folders.

Thanks
Meiyappan.R

Mittal Bhanderi
Replied On February 8, 2012 03:07 PM UTC

Hi there,

I've been trying to add Gujarti font to my pdf but for some reason the text is blank in the pdf output.

It worked fine for me in Russin, Arabic and Hebrew.

Can you please help?

Thanks,
M


Geetha M [Syncfusion]
Replied On February 13, 2012 01:26 PM UTC

Hi Mittal,

Thank you for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the problem. I tried to draw Gujarti text and it worked fine here. The code snippet is placed below:

PdfFont font = new PdfTrueTypeFont(new Font("Arial Unicode MS", 8f), true);

page.Graphics.DrawString("Google.co.in આમા ઉપલબ્ધ છે", font, PdfBrushes.Black, PointF.Empty);

Could you please try this and send me the modified code snippet if you still reproduce the problem?

Regards,

Geetha



Geetha M [Syncfusion]
Replied On February 13, 2012 01:26 PM UTC

Hi Mittal,

Thank you for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the problem. I tried to draw Gujarti text and it worked fine here. The code snippet is placed below:

PdfFont font = new PdfTrueTypeFont(new Font("Arial Unicode MS", 8f), true);

page.Graphics.DrawString("Google.co.in આમા ઉપલબ્ધ છે", font, PdfBrushes.Black, PointF.Empty);

Could you please try this and send me the modified code snippet if you still reproduce the problem?

Regards,

Geetha



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

;