485 questions
0
votes
0
answers
130
views
Delphi TWebBrowser Android: display cached website in offline mode
I have a project that requires me to convert a web app into an Android application.
My solution was that instead of recreating the app from scratch, I proposed making a Delphi FireMonkey Android ...
0
votes
2
answers
106
views
Saving HTML to local file from TWebBrowser denys access to html file
In Delphi XE7, I'm saving content of a TWebBrowser to a local HTML file:
function WB_SaveAs_HTML(WB:TWebBrowser; const FileName : string):boolean;
var
PersistStream: IPersistStreamInit;
Stream: ...
2
votes
2
answers
187
views
Delphi Firemonkey FMX Linux - Using TWebBrowser on Linux
I think I'm one of the few using Delphi 12.2 / Firemonkey for a real cross-platform app also on Linux. My app contains a TWebBrowser for viewing markdown code, no complex web content or JavaScript is ...
1
vote
2
answers
239
views
How to get the Delphi TWebBrowser component to scale for monitor DPI?
I built a simple Delphi program to test two solutions provided by Martin Schneider on StackOverflow here:
Enabling TWebBrowser High DPI support
... but when the program is dragged to a monitor scaled ...
1
vote
0
answers
109
views
Delphi + Android get value of input instantly
is it possible to get the result of a call to
LWebView.evaluateJavascript(StringToJString('test'), fJavaScriptValueCallback);
instantly?
My problem is that the event of the fJavaScriptValueCallback ...
-1
votes
1
answer
312
views
Trouble inserting text value into HTML input with TWebBrowser.EvaluateJavaScript()
I use TWebBrowser to insert data into a web form. My application is written in Delphi FMX and runs on Android. The element type text is not inserting the value string.
HTML:
<input
type="...
0
votes
1
answer
178
views
Control page setup options in Delphi without showing Page Setup dialog
In my Delphi application, I can use the following code to show the Page Setup dialog to my users before printing.
//WebHTML is a TWebBrowser with a Document loaded.
WebHTML.ExecWB(OLECMDID_PRINT, ...
0
votes
1
answer
119
views
Trouble rendering custom fonts in TWebBrowser
I'm using a TWebBrowser component to render a TinyMCE rich text editor.
This works fine, however, I've found that some of the fonts in the TinyMCE editor are not being rendered as they should.
This is ...
0
votes
0
answers
317
views
Is there a problem with Delphi TWebBrowser showing openstreetmap.org tiles in .png format
I am trying to incorporate a TwebBrowser into my Windows FMX application to display Leaflet Maps and openstreetmap .png tiles. The libraries for Leaflet Maps are available locally and when I view ...
0
votes
1
answer
585
views
How to scroll to the bottom of a TWebBrowser document in Delphi
I'm trying to scroll to the bottom of my displayed TWebBrowser document programmatically.
I've tried using the scroll method:
uses
MSHTML;
procedure TForm1.Button1Click(Sender: TObject);
var
...
0
votes
1
answer
700
views
How do I copy HTML content to a TCanvas in Delphi?
I have an application that uses a TWebBrowser to display an HTML report. I use a TCanvas, named PrintCanvas to print a page header, footer, and images. Now I'd like to add the content from the ...
0
votes
0
answers
1k
views
How to get IHTMLDocument2 interface in TWebBrowser EdgeMode (SelectedEngine = EdgeOnly)
I want to use the MSHTML interfaces IHTMLDocument2, IHTMLElement2, IHTMLElementCollection, etc with TWebBrowser.
In Document := WebBrowser.Document as IHTMLDocument2; when TWebbrowser.SelectedEngine = ...
2
votes
1
answer
752
views
Migrating TWebBrowser code to TEdgeBrowser, how to send Post data?
I am attempting to convert some code from TWebBrowser to use TEdgeBrowser, but I am having trouble figuring out how to send post and header data with an HTTP request.
Below is the TWebBrowser ...
1
vote
0
answers
170
views
Javascript Window.Print Doesn't Work in Android or iOS using TWebBrowser (Delphi)
I have a embeded web app in native FMX app (ios / android) via TWebBrowser.
All works ok, except Window.print. I use PDF js for viewer and print
if I use web app directly on safari / chrome printing ...
0
votes
1
answer
217
views
Delphi IOS Iphone TWebbrowser (Wkwebview) setAllowsInlineMediaPlayback(true) does not work
I try to inbound a fmx.TWebbrowser (Delphi 11) for displaying an youtube stream in an iphone app.
If I click the stream picture, the stream opens in the iphone movieplayer-window. So I have to zoom ...
1
vote
1
answer
894
views
Accessing and/or clearing cookies in Delphi's FMX TWebBrowser on Android
I'm currently developing an app on Android using Delphi, and a part of the authentification is done using the native TWebBrowser component, which as I'm understanding pulls from android's native ...
0
votes
1
answer
747
views
Changing UserDataFolder in TWebBrowser with Edge engine
When using TEdgeBrowser directly it is possible to set custom UserDataFolder property value. Is there a way to set it when using TWebBrowser with Edge engine?
Edit: found workaround: set ...
2
votes
1
answer
162
views
Load from IPersistMoniker takes long time to load unresolvable URL
I am loading an local disk drive _test.htm file through IPersistMoniker Load method. From what I believe, it is supposed to add the path to the relative URLs as base path. Problem is - it does not do ...
0
votes
1
answer
219
views
Load HTML from IPersistMoniker to add base URL to relative links
I am attempting to load HTML from URL using IPersistMoniker to add relative URLs base path, for example <img src="foo.jpg"> to load from mypath/images/ (or any other path). From what I ...
1
vote
1
answer
131
views
OleVariant and SafeSysFreeString
If I am using OleVariant instead of VARIANTARG to store VT_BSTR (VOleStr in OleVariant), do I still need to call SafeSysFreeString when I am done with the string, or is it called automatically by ...
0
votes
0
answers
491
views
How to click Button webbrowser delphi
<div id="lowbtn">
<a href="javascript:;" class="start" a2s="click" obj="MAIN_START" opt="{"Name":"...
2
votes
1
answer
160
views
Memory leak using IHTMLEventObj handlers with TWebBrowser
I'm using a TWebBrowser to display a WYSIWYG HTML editor and I've added some handlers to catch keyboard and mouse events so I can integrate this editor into my application flow. This browser is ...
0
votes
0
answers
145
views
How can I fix TWebBrowser memory leak in one-line program? Delphi 10.3
There have been many answers over the years about memory leaks and the TWebBrowser component, none of which helped me. I simplified the problem to one line of code.
WebBrowser1.Navigate2('https://www....
1
vote
2
answers
489
views
How to insert an SVG document text manually into a TWebBrowser at run-time?
In a Delphi 10.4.2 Win32 VCL Application, I need to insert an SVG document manually into a TWebBrowser (wb1.SelectedEngine := IEOnly;) at run-time:
procedure TForm1.btnLoadSVGDocClick(Sender: TObject);...
0
votes
0
answers
647
views
How to load a PDF file from an URL via TWebBrowser
I have a extracted an URL from an iframe in an HTML page online with TWebBrowser and this URL retrieves a PDF file. How can I save this reply in a File locally by using TWebBrowser?
The line in the ...