Hello,
I develop a dynamic pdf-document generator/server and I need a Delphi-/ActiveX Component, which helps me to load my fomated rtf-docs, fill the defined mail-merge-fields and convert it to pdf. Therefore I downloaded the PDFControl-Demo-Dll, but I have problems to set/replace defined mail-fields with my values. My sourcecode:
Code
//Settings
PDFControl.PDF_MailMergeStart := '@@';
//Main-Process
....
if PDFControl.StartEngine('wPDFControlDemo.dll', '', '', 0) then begin
PDFControl.BeginDoc('output.pdf', 0);
PDFControl.ExecIntCommand(WPCOM_RTFINIT, 0);
PDFControl.ExecStrCommand(WPCOM_RTFLOAD, 'rtffile.rtf');
PDFControl.ExecIntCommand(WPCOM_RTFPRINT, 0);
PDFControl.EndDoc;
PDFControl.StopEngine;
end;
......
procedure TfrmMain.PDFControlGetText(ASender: TObject; Number: Integer;
const Text: WideString);
var txt : String;
begin
txt := 'Tempstring';
PDFControl.SetResult(txt);
end;
Alles anzeigen
I would be happy if anyone could help me to fix my problem.
Thanks U very much at all,
Andreas Ptassek