Pull div content to external display in electron - electron

In my project, I need to achieve a very special function: pull div content to external display, div content include text, image, video, other html ..., enter image description here

You could use the screen module to detect the display and create another window and move it into there.

Related

I am trying to replace the Tooltip placeholder, $i18n{tooltipZoomOut}, in a PDF file loaded into TChromium

I have a Delphi 10.3 application and it uses TChromium to load local HTML files.
This works fine, and I can navigate to a PDF in the same window and it loads via Chrome's PDF handler.
The only problem I have is when hovering over the default buttons in the PDF viewer (such as Zoomin, print etc), I get what looks like the tooltip placeholder before it gets replaced with localized text.
$i18n{tooltipZoomOut} is the tooltip on the zoom out button, instead of nicer tooptip text. I can not find how to change this. I am not sure if it's something I can configure within Delphi or if I need to include a language file which Chromium will use.

how to get image from TWebBrowser into a TImage

I have a panel at the top of a form with a smallish TMemo set up as a drop target for URLs. Below that I have a Page Control with 2 tabs. I set up a TWebBrowser in one tab and some other stuff in the second tab. In the TWebBrowser, I need to login to a bug ticketing site we have, then browse tickets. Certain tickets have links to small images that clients want us to use (think something like logos). I can left-click on them and then drag-n-drop the link from the TWebBrowser to the TMemo at the top of the form. That picks up the image's URL and Title as expected.
The associated OnDrop event also switches to the 2nd tab and where I click a "Process" button. That causes the browser to navigate to the image (via Navigate2), which it loads into the browser window. That image is all that's in the browser window at this point.
So now I need the code to grab the image and load it into a TImage on the 2nd tabsheet. FWIW, the original image is a PNG.
I'm able to get the height and width of the image from the target image, but I'm not getting the image itself to show up in the TImage most of the time. Sometimes, but mostly not. I can load PNGs into these image objects just fine, so I know it displays PNGs properly.
(Maybe there's a way to do a download the image directly, but I wasn't able to get that to work. The TWebBrowser is used to login to an internal bug ticketing system where the images are being provided, and I can access that site only if it's on the same form and I've logged in. Otherwise the DL loads an HTML login page instead of the image. If there's a way to do that in the current framework, I'm open to suggestions.)
I'm finding the image file on the web page using IHTMLElement2.getelementsByTagName('img') and grabbing the first one (since I know that's all there is on the web page).
img := getFirstImage;
Image1_frame.Height := img.height+2;
Image1_frame.Width := img.width+2;
rnd := img as IHTMLElementRender ;
rnd.DrawToDC(Image1.Canvas.Handle);
Image1 is aligned to Client on a panel named Image1_frame. So I set the frame's H & W -- they get set ok.
But the image is usually not visible. It's just white.
I see that DrawToDC is deprecated, but I haven't found what to replace it with.
You can use this approach to auto login (if needed) :
Automated Log In (webBrowser)
Then you can use this to get the Image: Image from TWebBrowser to TPicture

How to access page of a multipage pdf file in Gimp?

When I open a multipage pdf file, gimp lets me select the pages I want to import. After opening the file, the first page selected appears in a file window. How do I access the other pages?
thanks
Each page is loaded as a layer. To see a page you have to make the layers above it invisible, this is done by clicking the eye icon on the left of the layer thumbnails in the Layers list.
Shift-click on the icon of a Layer toggles the visibility of all other layers, so this is a very quick way to make it visible.
If you need to put all the pages side by side, there are scripts for this, for instance ofn-layer-tiles that you will find here.

how to block all images of website in uiwebview ios?

how to block all images in UIWebview like as if you are open
yahoo.com in this website all image content should be block mens user
can not see image.
thanks.
You could run or install some JavaScript which traverses the DOM and hides all images. Or add CSS for image tags to hide them. Or deny any image URL request in the web view delegate. There are a number of possible solutions depending on how the images are loaded and how you can tell what an image actually is.

Show HTML inside VLC

I am writing a vlc extension.
It should add a search box in vlc , where a user can google/youtube search anything and the search results(html page) are to be displayed inside the vlc window.
I can add the search box extension using lua script but I dont have any idea on how to display html page inside vlc.
How can I achieve it ?
You cannot display html content within VLC because it does not include a HTML renderer. You can display formatted text though.
Adding a html renderer would double VLC download and installation size and would only be beneficial to very small group of users, so we actively decided against this move.

Resources