Page 1 sur 1

UDF printMGv2.au3

Posté : mar. 05 mai 2020 11:05
par Yle
Bonjour,
L'udf printMGv2.au3 permet d'écrire directement sur une imprimante. A l'aide d'une redirection, serait-il possible d''écrire la même chose dans un fichier ?

Ci-joint un petit exemple de code :

Code : Tout sélectionner

#NoTrayIcon
#include-once
#AutoIt3Wrapper_UseX64=N
#autoit3wrapper_res_language=1036
#EndRegion

#include <printMGv2.au3>
 Global $hp
Local $mmssgg

$hp = _PrintDllStart($mmssgg);this must always be called first

_PrintSetDocTitle($hp,"TEST IMPRESSION")
_PrintStartPrint($hp)
_PrintSetFont($hp,'Arial',18,0,'bold')

$Title = "ESSAIS ESSAIS"
$tw = _PrintGetTextWidth($hp,$Title)
$th = _PrintGetTextHeight($hp,$title)
_PrintText($hp,$title,200,200)

_PrintEndPrint($hp)
_printDllClose($hp)

Re: UDF printMGv2.au3

Posté : mar. 05 mai 2020 13:12
par Nine
Je n'ai jamais testé cela mais je sais que quelqu'un du site anglo a suivi cette approche avec succès...

https://support.microsoft.com/en-ca/hel ... tervention

Edit : testé et fonctionnel...

Re: UDF printMGv2.au3

Posté : ven. 26 juin 2020 10:36
par Yle
Avec beaucoup de retard, c'est fonctionnel. Merci