rencarnacion Posted May 30, 2014 Share Posted May 30, 2014 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 More sharing options...
Administrators Farshad Mohajeri Posted May 30, 2014 Administrators Share Posted May 30, 2014 Create your pdf in: UniServerModule.LocalCachePath then UniURLFrame1.URL := UniServerModule.LocalCacheURL + 'mypdf.pdf'; Link to comment Share on other sites More sharing options...
rencarnacion Posted May 30, 2014 Author Share Posted May 30, 2014 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 More sharing options...
Administrators Farshad Mohajeri Posted May 30, 2014 Administrators Share Posted May 30, 2014 What is rest of your code? UniURLFrame1.URL := ??? Link to comment Share on other sites More sharing options...
mhmda Posted May 31, 2014 Share Posted May 31, 2014 hi 1 Link to comment Share on other sites More sharing options...
rencarnacion Posted June 2, 2014 Author Share Posted June 2, 2014 Hi Farshad Here What I do UniURLFrame1.URL := CacheFilename Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 2, 2014 Administrators Share Posted June 2, 2014 var FName: string; FName := FormatDateTime('hhmmsszzz', NOW) + 'Reporte.pdf'; CacheFileName := UniServerModule.LocalCachePath + Fname; UniURLFrame1.URL := UniServerModule.LocalCacheURL + FName; Link to comment Share on other sites More sharing options...
rencarnacion Posted June 2, 2014 Author Share Posted June 2, 2014 Hi, Farshad I did it as you say but didn't work either Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 2, 2014 Administrators Share Posted June 2, 2014 I don't know. It is hard to say without seeing your complete code . Link to comment Share on other sites More sharing options...
rencarnacion Posted June 2, 2014 Author Share Posted June 2, 2014 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 More sharing options...
Administrators Farshad Mohajeri Posted June 2, 2014 Administrators Share Posted June 2, 2014 I don't understand your code. What is gs_ReporteDireccion and what is UniMainModule.gs_ReporteDireccion ?? You have not corrected your code according to my above instructions. Link to comment Share on other sites More sharing options...
rencarnacion Posted June 2, 2014 Author Share Posted June 2, 2014 gs_ReporteDireccion is Global Variable that come from MainModule Link to comment Share on other sites More sharing options...
juniorcsa Posted June 5, 2015 Share Posted June 5, 2015 How to obtain the html code of a page open in UniURLFrame1.URL.example:// Loading the siteUniURLFrame1.URL:='http://www.nfe.fazenda.gov.br/portal/consulta.aspx?tipoConsulta=completa&tipoConteudo=XbSeqxE8pl8='// Getting html code site after being loadedUniMemo1.text: = UniURLFrame1.html.text;My problem is getting the code, someone can help me with this? Link to comment Share on other sites More sharing options...
FXSystems Posted November 30, 2022 Share Posted November 30, 2022 Hi juniorcsa. Did you solve the problem of getting the HTML code from the loaded URL into the URLFrame? If so, could you suggest how to do it? Thank you in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now