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
MR
Meiyappan R
Syncfusion Team
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
MR
Mark Renwick
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
MR
Meiyappan R
Syncfusion Team
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
MR
Mark Renwick
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
MR
Meiyappan R
Syncfusion Team
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
MB
Mittal Bhanderi
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
GM
Geetha M
Syncfusion Team
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
GM
Geetha M
Syncfusion Team
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