Criação de seqÜência de pdf
Tenho o seguinte processo:
While not eof do
begin
...Cont := Cont + 1;
...SetLength(NumeroArquivo, Cont);
...NumeroArquivo[Cont - 1] := FieldByName(´SEQUENCIA´).AsInteger;
...etc;
...Try
......RVSystem1.DefaultDest := rdFile;
......RVSystem1.DoNativeOutput := false;
......RVSystem1.RenderObject := RvRenderPDF1;
......RVSystem1.OutputFileName := ´PDF\´ + IntToStr(NumeroArquivo[Cont - 1]) + ´.pdf´;
......RVSystem1.SystemSetups := RVSystem1.SystemSetups - [ssAllowSetup];
......RVSystem1.Execute;
...Fynally
......RvRenderPDF1.Free;
......RichEdit1.Lines.Clear;
......RichEdit1.Lines.Add(IntToStr(Cont - 1) + ´ Pdfs criados´);
...end;
...next
end;
Existe o processo de criação dos pdf, só que ele cria o primeiro corretamente e os demais (do segundo em diante), saem em tamanho menor e o adobe não consegue abrir, dizendo que os mesmos estão danificados.
Aguém sabe o motivo?
While not eof do
begin
...Cont := Cont + 1;
...SetLength(NumeroArquivo, Cont);
...NumeroArquivo[Cont - 1] := FieldByName(´SEQUENCIA´).AsInteger;
...etc;
...Try
......RVSystem1.DefaultDest := rdFile;
......RVSystem1.DoNativeOutput := false;
......RVSystem1.RenderObject := RvRenderPDF1;
......RVSystem1.OutputFileName := ´PDF\´ + IntToStr(NumeroArquivo[Cont - 1]) + ´.pdf´;
......RVSystem1.SystemSetups := RVSystem1.SystemSetups - [ssAllowSetup];
......RVSystem1.Execute;
...Fynally
......RvRenderPDF1.Free;
......RichEdit1.Lines.Clear;
......RichEdit1.Lines.Add(IntToStr(Cont - 1) + ´ Pdfs criados´);
...end;
...next
end;
Existe o processo de criação dos pdf, só que ele cria o primeiro corretamente e os demais (do segundo em diante), saem em tamanho menor e o adobe não consegue abrir, dizendo que os mesmos estão danificados.
Aguém sabe o motivo?
Edilcimar
Curtidas 0
Respostas
Edilcimar
13/12/2007
Já descobri o erro, basta substituir
RvRenderPDF1.Free por RvRenderPDF1.Active := False;
RvRenderPDF1.Free por RvRenderPDF1.Active := False;
GOSTEI 0