UDF printMGv2.au3

Aide et conseils concernant AutoIt et ses outils.
Règles du forum
.
Répondre
Avatar du membre
Yle
Niveau 5
Niveau 5
Messages : 167
Enregistré le : mar. 21 avr. 2009 17:22
Localisation : La NORMANDIE -76
Status : Hors ligne

UDF printMGv2.au3

#1

Message 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)
Avatar du membre
Nine
AutoIt MVPs (MVP)
AutoIt MVPs (MVP)
Messages : 103
Enregistré le : ven. 17 avr. 2020 01:23
Status : Hors ligne

Re: UDF printMGv2.au3

#2

Message 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...
Avatar du membre
Yle
Niveau 5
Niveau 5
Messages : 167
Enregistré le : mar. 21 avr. 2009 17:22
Localisation : La NORMANDIE -76
Status : Hors ligne

Re: UDF printMGv2.au3

#3

Message par Yle »

Avec beaucoup de retard, c'est fonctionnel. Merci
Répondre