I have installed the wpdf server version in new wptools 9 and it works great as a vcl app witth no external DLL's. But when I try in in my web ISAPI app (dll) I get access violation. on WPPDFExport.Print
Access violation at address 0215937B in module 'PdsWebServer.dll'. Write of address 00000000
It does create a .pdf file, but it is missing the image at the top of the document. Is there other units I need to include when using as in a .DLL?
My uses clause includes "WPRTEDefs, WPCTRMemo, WPCTRRich, WPPDFR1, WPPDFWP, WPUtil"
Is there something I am missing.
IN WPDF_INC.INC
{$DEFINE WPDF4}
{$DEFINE WPDF3} // does this need to be turned off?
{$DEFINE WPDFPLUS}
// This define MUST be enabled. It switches the use of the wPDF DLL on
// If you have wPDF PLUS or the InterNet server edition please
// disable this $define
{$IFNDEF WPDFPLUS}
{$DEFINE INTWPSWITCH} // wPDF Standard: ON - wPDF PLUS: OFF
{$ENDIF}
// Activate this to compile WPDF2
{.$DEFINE WPDF_VER2} // does this need to be turned on (wdf says it is version 4)
Function Rtf2Pdf2(InFile,OutFile :String):Boolean;
var
WPRichText :TWPRichText;
WPPDFExport: TWPPDFExport;
begin
Result:=True;
Trace('Rtf2Pdf2 start');
WPRichText:= TWPRichText.CreateDynamic;
WPPDFExport:= TWPPDFExport.Create(nil);
WPPDFExport.Source := WPRichText;
try
WPDF_Start('xxxxx','yyy@zzzz'); // using new license code for wpdf server version
WPRichText.LoadFromFile(infile);
WPPDFExport.FileName := outfile;
WPRichText.ReformatAll(true);
Trace('Rtf2Pdf2 Before Print');
WPPDFExport.Print;
Trace('Rtf2Pdf2 after Print');
finally
WPRichText.Free;
WPPDFExport.Free;
end;
end;