Hi,
we have the license of Aspose.Words for. net and we are trying to use it in Delphi VCL applications.
Do you have any examples in Delphi to help us?
We have to transform a HTML file to PDF format.
The following source code:
procedure TForm1.Button1Click(Sender: TObject);
var
Fs: TFileStream;
Ms: TMemoryStream;
begin
if fileExists(edtpath.text) then
begin
Fs := TFileStream.Create(edtpath.text, fmOPENREAD );
Ms := TMemoryStream.Create();
Ms.LoadFromStream(Fs);
Ms.SaveToFile(edtpath2.text+'teste.html');
License1.SetLicense(ExtractFilePath(Application.ExeName)+'Aspose.Words.lic');
LoadOptions1.LoadFormat := LoadFormat_Html;
Document1(edtpath.text, LoadOptions1);
Document1.Save_2(edtpath2.text+'teste1.pdf', SaveFormat_Pdf);
FreeAndNil(Ms);
FreeAndNil(Fs);
end;
end;