Jump to content

I need help in How to load PDF file in UniURLFrame1.URL


rencarnacion

Recommended Posts

Hi, People, Need help  as soon as possible,  in how Could I load a pdf file in a UrlFrame because I was trying  like  these    " UniURLFrame1.URL :=  myAddress+'Namdd.pdf'"  but It doesn't work .

 

If I  can do it in a  UrlFrame I can resolve my problem with ReportBuilder Using RichText

 

Thanks 

Link to comment
Share on other sites

I'm doing like you say

 

look what I'm Doing 

  CacheFileName := UniServerModule.LocalCachePath + FormatDateTime('hhmmsszzz',
    NOW) + 'Reporte.pdf';
 

But It doen't work then  If I use like these Work Fine "UniSession.SendFile(CacheFileName);"

The application need to use  the preview in a frame or something like that 

Link to comment
Share on other sites

procedure Imprimir(ReporteSalida: TppReport);

var

  lPDFDevice: TppPDFDevice;

  CacheFileName,FName: string;

begin

 

  // creat and configure the PDFDevice

  lPDFDevice := TppPDFDevice.Create(nil);

  FName  := FormatDateTime('hhmmsszzz', NOW) + 'Reporte.pdf';

  CacheFileName := UniServerModule.LocalCachePath+FName ;

 

  try

    lPDFDevice.PDFSettings := ReporteSalida.PDFSettings;

    lPDFDevice.FileName := CacheFileName; // assign output stream

    lPDFDevice.Publisher := ReporteSalida.Publisher;

 

    // generate the report

    gs_ReporteDireccion := CacheFileName;

    ReporteSalida.PrintToDevices;

    gs_ReporteDireccion :=  CacheFileName;

HtmlFramePreview.URL := UniMainModule.gs_ReporteDireccion;

//    UniSession.SendFile(CacheFileName);

 

  finally

    lPDFDevice.Free;

End;
Link to comment
Share on other sites

  • 1 year later...
  • 7 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...