Hello friends
sorry to use google translator to talk to you
I am using Delphi 7 and report builder to generate reports
I would like to use virtual printer to save my reports in PDF
but this with the following error
Method ‘ConvertTo’ not supported by automation object
PDFObject:= CreateOleObject(‘PDFCreator.JobQueue’);
//PDFObject:= CreateOleObject(‘PDFCreator.clsPDFCreator’);
PDFObject.Initialize;
Relatorio.ShowPrintDialog := False;
// Printer.PrinterIndex := Printer.Printers.IndexOfName(‘CutePDF Writer’);
//.IndexOf(‘CutePDF Writer’);
Relatorio.DeviceType:=‘PDFCreator’;
if DataModule1.ambientecte=‘HOMOLOGAÇÃO’ then
nomedoarquivo:=‘c:\temp’+Qprincipalcodcon.AsString+’.Pdf’
else
nomedoarquivo:=‘t:\publico\MINUTA’+Qprincipalcodcon.AsString+’.pdf’;
Relatorio.PrinterSetup.Copies:=1;
//PDFObject.ConvertTo(nomedoarquivo);
Relatorio.TextFileName:= nomedoarquivo;
Relatorio.Print;