Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 30, 2012 11:40 PM by SADOK
Member
135 Points
93 Posts
Jul 05, 2006 07:36 AM|LINK
hi to all,
i have downloaded the shrppdf files and started to work with it.
while running the first example in http://sharppdf.sourceforge.net/Tutorials.html as followed:
[code]
pdfDocument myDoc = new pdfDocument("TUTORIAL","ME"); pdfPage myPage = myDoc.addPage(); myPage.addText("Hello World!",200,450,predefinedFont.csHelvetica,20); myDoc.createPDF(@"c:\test.pdf"); myPage = null; myDoc = null;
[/code]
i get an error with the font definition as difined in the line:
line myPage.addText("Hello World!",200,450,predefinedFont.csHelvetica,20);
the error is:
cannot convert from 'sharpPDF.Enumerators.predefinedFont' to 'sharpPDF.Fonts.pdfAbstractFont'
how shoud i fix it ?
thank you
Ori
5 Points
1 Post
Nov 17, 2006 08:42 AM|LINK
change predefinedFont.csHelvetica to myDoc.getFontReference("Helvetica")
http://dotnet.org.za/trumpi/archive/2005/05/11/19781.aspx
2 Points
Aug 30, 2012 11:40 PM|LINK
you can also use :
using sharpPDF.Enumerators;
slasi.net
Member
135 Points
93 Posts
BUG: In sharppdf C# library
Jul 05, 2006 07:36 AM|LINK
hi to all,
i have downloaded the shrppdf files and started to work with it.
while running the first example in http://sharppdf.sourceforge.net/Tutorials.html as followed:
[code]
pdfDocument myDoc = new pdfDocument("TUTORIAL","ME");
pdfPage myPage = myDoc.addPage();
myPage.addText("Hello World!",200,450,predefinedFont.csHelvetica,20);
myDoc.createPDF(@"c:\test.pdf");
myPage = null;
myDoc = null;
[/code]
i get an error with the font definition as difined in the line:
line myPage.addText("Hello World!",200,450,predefinedFont.csHelvetica,20);
the error is:
cannot convert from 'sharpPDF.Enumerators.predefinedFont' to 'sharpPDF.Fonts.pdfAbstractFont'
how shoud i fix it ?
thank you
Ori
emilylin56
Member
5 Points
1 Post
Re: BUG: In sharppdf C# library
Nov 17, 2006 08:42 AM|LINK
change predefinedFont.csHelvetica to myDoc.getFontReference("Helvetica")
http://dotnet.org.za/trumpi/archive/2005/05/11/19781.aspx
SADOK
Member
2 Points
1 Post
Re: BUG: In sharppdf C# library
Aug 30, 2012 11:40 PM|LINK
you can also use :
using sharpPDF.Enumerators;