Jump to content

ISAPI app


jahlxx

Recommended Posts

Hi. Sorry for the delay.

 

I have benn using SynPDF, but now, I've updated to QR6 Pro, and don't need.

 

I gerenerate PDF, from QR directly now. But in prior version, I had this, tested, and works:

 

procedure Tlib.rptpdf(rep: tquickrep);
var
   i: integer;
   aMeta: TMetaFile;
   xpdf: tpdfdocument;
   xreport: string;
begin
   xpdf := tpdfdocument.create;
   xpdf.defaultpapersize := psA4;
   xpdf.defaultpagelandscape := false;

   rep.prepare;
   for i:= 1 to rep.QRPrinter.PageCount do begin
      xpdf.AddPage;
      aMeta := rep.QRPrinter.GetPage(i);
      try
         xpdf.Canvas.RenderMetaFile(aMeta,1,0,0);
      finally
         aMeta.Free;
      end;
   end;

   xreport := 'filename.pdf';
   xpdf.SaveToFile(xreport);

   UniSession.SendFile(xreport,xreport);

   xpdf.Free;
end;
 

 

I hope this help you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...