4D WebArea drucken

english preferred

Eine 4D WebArea drucken

Im Browser ist das einfach, Ablage/Drucken… und die aktuell angezeigte Seite wird gedruckt. Wie kann ich die in 4D WebArea angezeigte Seite drucken?

Es braucht eine Zeile Code. Entweder diese
WA EXECUTE JAVASCRIPT FUNCTION(*;$wa_AreaObj;“javascript:window.print()“;$Result)
oder jene
$error_L:=WA Evaluate JavaScript(*;$wa_AreaObj;“javascript:window.print()“;Is longInt)

Hier mein Webbrowser in meiner 4Dapp

Unten rechts der Button Drucken. Wird Drucken geklickt wird einer der beiden Varianten oben angestoßen.


Dann habe ich alle Möglichkeiten des Druckers, z.B. wie hier beide Seiten auf ein Blatt und dann als PDF sichern.

lieber auf deutsch

Print a 4D WebArea

Printing is easy from a WebBrowser. Call File/Print… and the currently displayed page will be printed. How can I print the currently displayed webpage of a 4D-webarea?

You need one line of code. Either this one
WA EXECUTE JAVASCRIPT FUNCTION(*;$wa_AreaObj;“javascript:window.print()“;$Result)
or that one
$error_L:=WA Evaluate JavaScript(*;$wa_AreaObj;“javascript:window.print()“;Is longInt)

Here a screenshot from my 4Dapp-webbrowser:

On the bottom-right is a button called Drucken, which means print in german. Click „Drucken“ and one of the options shown will get executed.

Here you see the options of the current printer, e.g. print both pages on one sheet of paper and save that to PDF.