#1 2018-07-17 16:54:44

ecptavares
Member
Registered: 2018-07-17
Posts: 1

Error Message when opening PDFs generated with synPDF.

Hi!
I have made an application using Delphi and synPDF.I have a routine that exports some data to PDF with this code :

Var
  PDF : TPDFDocumentGDI;
  Page : TPDFPage;
  I,J : Integer;
  Senha : String;
begin
  Senha := 'CLINLIFE' + StringReplace(FormatDateTime('dd/MM/yyyy',Date),'/','',[rfReplaceAll]);

  PDF := TPDFDocumentGDI.Create(false,0,false,tpdfencryption.New(elRC4_40,Senha,'toto',PDF_PERMISSION_NOMODIF));
  I := 100;
  Try
    PDF.Info.Author := 'Eduardo Pinho Tavares';
    PDF.Info.CreationDate := Now;
    PDF.Info.Creator := 'Receitas CLINLIFE';
    PDF.Info.Subject := 'Receitas CLINLIFE';
    PDF.Info.Title := 'Receita da Clinlife';

    Page := PDF.AddPage;
    Page.PageLandscape := False;

    PDF.DefaultPaperSize := psA4;

    PDF.VCLCanvas.Font.Size := 12;
    PDF.VCLCanvas.Font.Style := [fsBold];
    PDF.VCLCanvas.TextOut(10,1,'Cliente : ' + Cliente);
    PDF.VCLCanvas.Font.Style := [fsItalic];
    PDF.VCLCanvas.TextOut(10,23,'Telefone : ' + Telefone + ' - Celular : ' + Celular);
    PDF.VCLCanvas.TextOut(10,45,'DATA : ' + FormatDateTime('dd/mm/yyyy',Date));
    PDF.VCLCanvas.Font.Size := 16;
    PDF.VCLCanvas.Font.Style := [];
    PDF.VCLCanvas.TextOut(10,I,':: RECEITAS CLINLIFE ::');

    PDF.VCLCanvas.Font.Size := 12;
    PDF.VCLCanvas.Font.Style := [fsItalic];

    for J := 0 to Texto.Lines.Count -1 do
      Begin
        I := I + 21;
        PDF.VCLCanvas.TextOut(15,I,Texto.Lines[J]);
      End;

    if PDF.SaveToFile(FileName) Then
     Begin
      Result := True;
      LogAtividade( 'Arquivo','Convertido para PDF');
     End
    Else
     Begin
       Result := False;
     End;
  Finally
    PDF.Free;
  End;
end;

I can open the PDFs just fine but the person I send these PDFs to she cant open.She gets a message "Maximum Tab Limit Reached" . What is this? She uses Adobe Reader to open those PDFs files.

Thank you very much!

Offline

#2 2018-07-18 07:51:29

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Error Message when opening PDFs generated with synPDF.

I am not able to reproduce it - I have Acrobat Reader X on Windows.

(and please do not put huge code in the forum, but use a third-party service as stated by the https://synopse.info/forum/misc.php?action=rules)

Did you try with elRC4_128?

Offline

Board footer

Powered by FluxBB