#1 Re: PDF Engine » Acrobate reader close when try open an pdf file but open it in browser » 2024-10-26 21:55:56

i copy the last updtate  but sometimes rise this error in syntable: undeclared indentifier PtrInt.

type
  PMatch = ^TMatch;
  TMatchSearchFunction = function(aMatch: PMatch; aText: PUTF8Char; aTextLen: PtrInt): boolean;


how can i fix it?

#2 Re: PDF Engine » Acrobate reader close when try open an pdf file but open it in browser » 2024-10-25 01:41:02

ttomas wrote:

Declared in SynCommons.pas, do you mix old and new pas files?

It finaly work again but my problem remains!!
Open pdf in browser works fine but open in acrobate, last version, after 10 secs close it self!!

#3 Re: PDF Engine » Acrobate reader close when try open an pdf file but open it in browser » 2024-10-25 00:44:57

ttomas wrote:

Declared in SynCommons.pas, do you mix old and new pas files?

In syntable.pas undeclared identifier Ptrint

Whats this?

#4 Re: PDF Engine » Acrobate reader close when try open an pdf file but open it in browser » 2024-10-25 00:11:09

ttomas wrote:

Declared in SynCommons.pas, do you mix old and new pas files?

Well i though it was only compile synpdf.pas!

#6 Re: PDF Engine » Acrobate reader close when try open an pdf file but open it in browser » 2024-10-24 09:46:03

ab wrote:

Use the latest version please.
From mormot 1 or mormot 2.

Can you send me link to that update, please?

#7 Re: PDF Engine » Acrobate reader close when try open an pdf file but open it in browser » 2024-10-24 09:19:40

ab wrote:

I am not able to reproduce here.

1) Which compiler do you use?
2) Which version of SynPDF do you use? Where did you get from?
Note that we recommend using mormot.ui.pdf from mORMot 2 for any maintainable project, because it will be more maintained.

Please give a minimal reproducible example (see the forum rules).
Thanks!

Iam using Delphi6 and Version os Synpdf is 1.18.4554

After open pdf and exacly 10 seconds closes da acrobate!

https://tdpip-my.sharepoint.com/:b:/g/p … w?e=nXx49t

#8 PDF Engine » Acrobate reader close when try open an pdf file but open it in browser » 2024-08-13 22:14:54

Zink
Replies: 11

Hello!

When i try to open a pdf in acrobate reader  this app close immediatly!! But when open in any browser works great!

How to fix this?

Thanks!

#9 Re: PDF Engine » why some text is missing when export report into a pdf file? » 2020-11-28 23:03:19

Hi! i didnt know that i was not follow rules!!

can you help me?

#10 PDF Engine » why some text is missing when export report into a pdf file? » 2020-11-28 14:41:02

Zink
Replies: 2

Hi!

I use quickreport to build the report  and use treachedit to build a report wid 14 pages.
So far so good!!  i use win7 but some my client use win10 and, not all, some are tolde me that some text info is missing in that pdf files!
When i make a preview from quickreport all info still there 100% perfect but when export into pdf some info text missing!!
my clients have to try several tryes and with the 4ird attemt the report in pdf rises perfect!

i use this  code:

procedure ExportToPDF1();
var
  // variáveis necessárias para a geração do PDF
  oPDF: TPDFDocument;
  oMetaDados: TMetafile;
  oPosicionamento: TPDFCanvasRenderMetaFileTextPositioning;
  nPagina: integer;
  ano,programpath,filetosave:string;
  SearchRec : TSearchRec;
begin
  // cria uma instância do documento PDF
  oPDF := TPDFDocument.Create(True, 0, False, nil);

  // inicializa a variável de metadados
  oMetaDados := nil;
  try
    // configura o tipo do papel
    oPDF.DefaultPaperSize := psA4;

    // configura o posicionamento dos caracteres
    //oPosicionamento := tpKerningFromAveragePosition;
      oPosicionamento :=tpExactTextCharacterPositining;
    // configura o layout de visualização do documento
    oPDF.Root.PageLayout := plOneColumn;

    // ajusta a orientação do documento, caso o relatório esteja em paisagem
    if printc.QuickRep1.Page.Orientation = poLandscape then
    begin
      oPDF.DefaultPageLandscape := True;
    end;

    // prepara o relatório
    printc.QuickRep1.Prepare;

    // carrega os metadados de cada página do relatório
    for nPagina := 1 to printc.QuickRep1.QRPrinter.PageCount do
    begin
      // adiciona uma nova página no documento
      oPDF.AddPage;

      // carrega os metadados da página
      oMetaDados := printc.QuickRep1.QRPrinter.GetPage(nPagina);

      // renderiza os metadados
      oPDF.Canvas.RenderMetaFile(oMetaDados, 1, 0, 0, 1, oPosicionamento);

      // limpa a variável de metadados
      oMetaDados := nil;
    end;


    // salva o arquivo
     programpath := ExtractFilePath( Application.ExeName );



try
   FindFirst(programpath+'\tempdf*.*', faAnyFile, SearchRec);
   repeat
    DeleteFile(programpath+'\' + SearchRec.name);
   until FindNext(SearchRec) <> 0;
finally
   FindClose(SearchRec);
end;


  try
   if FindFirst(programpath+'\tempdf*.*', faAnyFile, SearchRec)=0 then
   begin
    repeat


    until FindNext(SearchRec) <> 0;
   filetosave:=copy(searchrec.Name,pos('_',searchrec.Name)+1,(pos('.',searchrec.Name)-(pos('_',searchrec.Name)+1)));
   filetosave:='tempdf_'+floattostr(strtofloat(filetosave)+1);
   end
    else
     begin
      filetosave:='tempdf_0';
     end;
finally
   FindClose(SearchRec);
end;

     
    oPDF.SaveToFile(programpath+'\'+filetosave+'.pdf');
    programpath:=programpath+'\'+filetosave+'.pdf' ;
    ShellExecute(Handle, 'open',Pchar(programpath),nil,nil,SW_SHOWNORMAL) ;

  finally

    // libera as variáveis
    oMetaDados.Free;
    oPDF.Free;

  end;
end;

Board footer

Powered by FluxBB