Anyone used .net's iTextSharp in Jade?
Posted: Wed Jun 27, 2012 6:16 pm
Trying to utilise this library http://sourceforge.net/projects/itextsharp/ to make working with PDF a little easier for a web project.
After importing the .Net library i've followed this guide:
http://www.mikesdotnetting.com/Article/ ... iTextSharp
and written the following:
Although I keep getting this error, and have spent a few hours trying to figure it out:
I've never written .net before so it's all a bit new to me, what i'm doing wrong is probably really obvious.
'Document' comes from the iTextSharp library, its at 'writer.getInstance(doc,stream);' where I get the above error which I'm struggling with.
Any thoughts would be much appreciated!
After importing the .Net library i've followed this guide:
http://www.mikesdotnetting.com/Article/ ... iTextSharp
and written the following:
Code: Select all
vars
doc : Document;
stream : FileStream;
writer : PdfWriter;
begin
create doc transient;
create stream transient;
create writer transient;
doc.createDotNetObject();
stream.createDotNetObject_4_82('test.pdf'.StringUtf8,stream.FileMode_OpenOrCreate);
writer.getInstance(doc,stream);
end;
Code: Select all
Failed to create .NET object
System.MissingMethodException: Constructor on type 'iTextSharp.text.pdf.PdfWriter' not found.
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
at JadeDotNet.CDotNetObject.CreateObject(String AsmName, String TypName, DskParam* pParams)
'Document' comes from the iTextSharp library, its at 'writer.getInstance(doc,stream);' where I get the above error which I'm struggling with.
Any thoughts would be much appreciated!