Jump to content

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


rencarnacion
 Share

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...

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.

 Share

×
×
  • Create New...