rencarnacion Posted May 30, 2014 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 Quote
Administrators Farshad Mohajeri Posted May 30, 2014 Administrators Posted May 30, 2014 Create your pdf in: UniServerModule.LocalCachePath then UniURLFrame1.URL := UniServerModule.LocalCacheURL + 'mypdf.pdf'; Quote
rencarnacion Posted May 30, 2014 Author 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 Quote
Administrators Farshad Mohajeri Posted May 30, 2014 Administrators Posted May 30, 2014 What is rest of your code? UniURLFrame1.URL := ??? Quote
rencarnacion Posted June 2, 2014 Author Posted June 2, 2014 Hi Farshad Here What I do UniURLFrame1.URL := CacheFilename Quote
Administrators Farshad Mohajeri Posted June 2, 2014 Administrators Posted June 2, 2014 var FName: string; FName := FormatDateTime('hhmmsszzz', NOW) + 'Reporte.pdf'; CacheFileName := UniServerModule.LocalCachePath + Fname; UniURLFrame1.URL := UniServerModule.LocalCacheURL + FName; Quote
rencarnacion Posted June 2, 2014 Author Posted June 2, 2014 Hi, Farshad I did it as you say but didn't work either Quote
Administrators Farshad Mohajeri Posted June 2, 2014 Administrators Posted June 2, 2014 I don't know. It is hard to say without seeing your complete code . Quote
rencarnacion Posted June 2, 2014 Author 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; Quote
Administrators Farshad Mohajeri Posted June 2, 2014 Administrators 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. Quote
rencarnacion Posted June 2, 2014 Author Posted June 2, 2014 gs_ReporteDireccion is Global Variable that come from MainModule Quote
juniorcsa Posted June 5, 2015 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? Quote
FXSystems Posted November 30, 2022 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.