cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

LabVIEW 26Q1 Browser Control - HTML Print to PDF

Resolvido!
Ir para a solução

Is it possible to print HTML to PDF from the new browser control like you could with the Webview2 control (sklein)? Interestingly if you feed the new control a pdf it shows a tool banner with print a button, but I don't see a way to turn the tool bar on/off programmatically.

 

System: Win11 VM, Microsoft Edge. (Adobe Acrobat, MS Office not installed) 

0 Kudos
Mensagem 1 de 6
729Exibições

There is very little information in the help except it's a browser!  What is it based on? Where is the cache ? Does it cache? This is important if pages are partially dynamic.

Hav you tried ctrl+p? Maybe as a hack, try to give the control focus and then send control+p then enter

Mensagem 2 de 6
585Exibições
Solução
Aceita pelo autor do tópico al_g

To print from the new browser control call "window.print();" through an invoke node > Execute Javascript.

print.png

Mensagem 3 de 6
508Exibições

To control the toolbar display of a pdf in the browser control, the pdf file needs to be loaded from an html file using iframe with the "toolbar" option. It doesn't work as sting constant.

 

al_g_1-1770741273929.png

 

Example toolbar off:

<!DOCTYPE html>
<html>
<iframe src="c:\Project Files\Enchiladas.pdf#toolbar=0" width="100%" height="978">
</html>

 

Example toolbar on:

<!DOCTYPE html>
<html>
<iframe src="c:\Project Files\Enchiladas.pdf#toolbar=1" width="100%" height="978">
</html>

 

 

 

Mensagem 4 de 6
504Exibições

This is really useful information thank you! Have you found any documentation from NI or is this just general web and JavaScript stuff? 

Thanks!!

0 Kudos
Mensagem 5 de 6
492Exibições

There are a few LabVIEW examples in example finder, but not for these specific questions. It was mostly Javascript web searches and trial and error.

0 Kudos
Mensagem 6 de 6
479Exibições