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!