Impression Jpg

cs_Cpapy Messages postés 133 Date d'inscription mercredi 30 octobre 2002 Statut Membre Dernière intervention 25 septembre 2007 - 9 janv. 2007 à 14:21
cs_Cpapy Messages postés 133 Date d'inscription mercredi 30 octobre 2002 Statut Membre Dernière intervention 25 septembre 2007 - 9 janv. 2007 à 15:34
Bonjour à vous tous,


Dans un Programme VB j'imprime des Jpg avec Paintpicture.
 Sur une imprimante Canon,  c'est Ok
 Sur une imprimante Hp 2575 PhotoSmart j'ai le message d'erreur [Le Format ou le type de Papier n'est pas correct]


Pour pallier à ce problème, j'ai rajouté dans le code ci dessous les deux lignes (**) pour charger manuellement les options de l'imprimante. ?........................


   Ca ne marche toujours pas !




QUESTION: Qu'elles sont les instructions qui me permettront de  standardiser ce code





<hr />
Printer.Orientation 2Printer.ScaleMode 6 'Millimetres
Printer.PrintQuality = vbPRPQHigh
Printer.Copies = 1
Printer.CurrentX = 0
Printer.CurrentY = 0
EspaceGauche = 0
EspaceDroite = 112
EspaceDroite = 210 - TAILLEPAPIERHAUT  '112

** CommonDialog1.PrinterDefault = True
** CommonDialog1.ShowPrinter                         pour paramétrer l'imprimante

Printer.PaintPicture (Une Image) ,............................
Printer.EndDoc

<hr />
Les instructions précises me seraient d'un grand secours.Par avance Merci

3 réponses

jmfmarques Messages postés 7666 Date d'inscription samedi 5 novembre 2005 Statut Membre Dernière intervention 22 août 2014 27
9 janv. 2007 à 14:56
Une réponse, déjà, pour l'emploi de la constante  vbPRPQHigh :

"The effect of the properties of the Printer object depends on the driver supplied by the printer manufacturer. Some property settings may have no effect, or several different property settings may all have the same effect. Settings outside the accepted range may or may not produce an error. For more information, see the manufacturer's documentation for the specific driver."
0
jmfmarques Messages postés 7666 Date d'inscription samedi 5 novembre 2005 Statut Membre Dernière intervention 22 août 2014 27
9 janv. 2007 à 14:59
Une 2ème réponse (toijours l'aide en ligne) :

"Note   If you use the Printers collection to specify a particular printer, as in Printers(3), you can only access properties on a read-only basis. To both read and write the properties of an individual printer, you must first make that printer the default printer for the application."
0
cs_Cpapy Messages postés 133 Date d'inscription mercredi 30 octobre 2002 Statut Membre Dernière intervention 25 septembre 2007
9 janv. 2007 à 15:34
Merci, mais je ne sais toujours que faire pour Standardiser ce code pour qu'il puisse tourner correctement sur tout types d'imprimantes
0
Rejoignez-nous