Yes, Robin. But actually I did that validation error persists mostrandose on screen, and what initially want to do is to convert a document to PDF .xlsx.
attached the code I’ve been implementing and changing lately:
procedure TForm1.btn2Click(Sender: TObject);
var
LQueue: IQueue;
LPrintJob: IPrintJob;
LPDFCreator: IPDFCreator;
LPrinter: IPrinters;
begin
LPDFCreator:= CoPdfCreatorObj.Create; //creo el objeto pdfCreator
LPrinter:= CoPrinters.Create; //creamos el Printers
LPrinter.GetPrinterByIndex(0); //Retorna el nombre de la impresora con el indice correspondiente
LPrinter:= LPDFCreator.GetPDFCreatorPrinters; //metemos un objeto Printer en la variable LPrinter
// LPDFCreator.PrintFile(‘C:\taty.xlsx’);
LQueue:= CoQueue.Create;
LQueue.Initialize;
//LPrintJob := CoPrintJob.Create;
{ if not (LQueue.WaitForJob(10)) then
ShowMessage(‘The print job did not reach the queue within 10 seconds’); }