Quel est le moyen le plus simple d’ajouter des formats de page personnalisés à un fichier .ppd?

StackOverflow https://stackoverflow.com/questions/1028891

  •  06-07-2019
  •  | 
  •  

Question

J'aimerais ajouter des formats de page personnalisés au fichier .ppd (définition d'imprimante PostScript) de mon imprimante. Que dois-je ajouter pour que la nouvelle taille de page fonctionne correctement?

Était-ce utile?

La solution 3

Comme je possède une imprimante Samsung, j'ai téléchargé le code source dans les pilotes SpliX. La source du pilote inclut un Makefile pour compiler .ppd à partir de sources répertoriant les tailles de page disponibles de manière beaucoup plus succincte. Le format de papier manquant apparaît maintenant dans les options de la boîte de dialogue Imprimer.

(Cela n'a pas résolu mon problème d'impression sur du papier de petit format. Mon vrai problème avec les formats de papier personnalisés est probablement lié à la façon dont les applications communiquent avec les gobelets et au passage de .ps à .pdf en tant que page préférée pour les gobelets. dans Ubuntu 9.04 ...)

Autres conseils

Vous devez ajouter des valeurs pour chaque taille de page supplémentaire à 4 endroits différents:

  1. pour PageSize ,
  2. pour PageRegion ,
  3. pour ImageableArea et
  4. pour PaperDimension

De préférence, vous prenez un PPD et recherchez les sections incluses dans ces mots clés

*OpenUI *PaperSize: PickOne
....
*CloseUI *PaperSize

.

*OpenUI *PageSize: PickOne
....
*CloseUI *PageSize

et pour les sections commençant par

*DefaultImageableArea: ...

.

*DefaultPaperDimension: ...

Utilisez les lignes que vous trouvez ici comme modèles pour vos nouvelles entrées. Notez que ces dimensions sont données en points PostScript (où 72pt == 1inch ~ = 2.54cm).

Mises en garde:

  1. Ajoutez vos nouvelles lignes à chacun des 4 emplacements du fichier PPD.
  2. Assurez-vous d'utiliser des noms uniq pour vos nouveaux formats de médias.
  3. Assurez-vous de ne pas avoir d'erreur de syntaxe dans votre fichier PPD.
  4. Une fois que vous avez terminé (ou que vous êtes en train de le modifier), vérifiez votre fichier PPD à l'aide de l'utilitaire cupstestppd (disponible sous Linux et Mac OS X).

Mettre à jour

À propos du test du fichier PPD avec cupstestppd :

Par défaut, cela signalera les erreurs sous la forme ** FAIL ** même s'il détecte des erreurs "pas si important". problèmes de syntaxe (traductions de chaînes PPD, filtres, contraintes UIC, profils, tailles de support). Vous pouvez assouplir un peu ces contrôles stricts et utiliser -W all pour les signaler tous en tant qu'avertissements uniquement, et non en tant qu'erreurs:

cupstestppd -W all /path/to/PPDfile.ppd

Si cela renvoie des lignes indiquant taille AVERTISSEMENT ... , vous devez leur accorder une attention particulière et vous assurer de corriger le fichier PPD.

J'ai HP LaserJet 1200. Le fichier PPD fourni par le pilote Foomatic / pxlmono manque de certains formats de papier standard. Je l'ai mis à jour avec les déclarations suivantes:

*OpenUI *PageSize/Page Size: PickOne
*FoomaticRIPOption PageSize: enum CmdLine A
*OrderDependency: 100 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
*FoomaticRIPOptionSetting PageSize=Letter: " -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792"
*End
*PageSize Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive"
*FoomaticRIPOptionSetting PageSize=Executive: " -dDEVICEWIDTHPOINTS=522 -dDEVICEHEIGHTPOINTS=756"
*End
*PageSize Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal"
*FoomaticRIPOptionSetting PageSize=Legal: " -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=1008"
*End
*PageSize A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
*FoomaticRIPOptionSetting PageSize=A4: " -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842"
*End
*PageSize A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5"
*FoomaticRIPOptionSetting PageSize=A5: " -dDEVICEWIDTHPOINTS=420 -dDEVICEHEIGHTPOINTS=595"
*End
*PageSize A6/A6: "%% FoomaticRIPOptionSetting: PageSize=A6"
*FoomaticRIPOptionSetting PageSize=A6: " -dDEVICEWIDTHPOINTS=298 -dDEVICEHEIGHTPOINTS=420"
*End
*PageSize A7/A7: "%% FoomaticRIPOptionSetting: PageSize=A7"
*FoomaticRIPOptionSetting PageSize=A7: " -dDEVICEWIDTHPOINTS=210 -dDEVICEHEIGHTPOINTS=298"
*End
*PageSize EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5"
*FoomaticRIPOptionSetting PageSize=EnvISOB5: " -dDEVICEWIDTHPOINTS=499 -dDEVICEHEIGHTPOINTS=709"
*End
*PageSize EnvISOB6/Envelope B6: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB6"
*FoomaticRIPOptionSetting PageSize=EnvISOB6: " -dDEVICEWIDTHPOINTS=354 -dDEVICEHEIGHTPOINTS=499"
*End
*PageSize EnvISOB7/Envelope B7: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB7"
*FoomaticRIPOptionSetting PageSize=EnvISOB7: " -dDEVICEWIDTHPOINTS=250 -dDEVICEHEIGHTPOINTS=354"
*End
*PageSize B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5"
*FoomaticRIPOptionSetting PageSize=B5: " -dDEVICEWIDTHPOINTS=516 -dDEVICEHEIGHTPOINTS=729"
*End
*PageSize B6/B6 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B6"
*FoomaticRIPOptionSetting PageSize=B6: " -dDEVICEWIDTHPOINTS=363 -dDEVICEHEIGHTPOINTS=516"
*End
*PageSize B7/B7 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B7"
*FoomaticRIPOptionSetting PageSize=B7: " -dDEVICEWIDTHPOINTS=258 -dDEVICEHEIGHTPOINTS=363"
*End
*PageSize Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10"
*FoomaticRIPOptionSetting PageSize=Env10: " -dDEVICEWIDTHPOINTS=297 -dDEVICEHEIGHTPOINTS=684"
*End
*PageSize EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL"
*FoomaticRIPOptionSetting PageSize=EnvDL: " -dDEVICEWIDTHPOINTS=312 -dDEVICEHEIGHTPOINTS=624"
*End
*PageSize EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch"
*FoomaticRIPOptionSetting PageSize=EnvMonarch: " -dDEVICEWIDTHPOINTS=279 -dDEVICEHEIGHTPOINTS=540"
*End
*PageSize EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5"
*FoomaticRIPOptionSetting PageSize=EnvC5: " -dDEVICEWIDTHPOINTS=459 -dDEVICEHEIGHTPOINTS=649"
*End
*PageSize EnvC6/Envelope C6: "%% FoomaticRIPOptionSetting: PageSize=EnvC6"
*FoomaticRIPOptionSetting PageSize=EnvC6: " -dDEVICEWIDTHPOINTS=323 -dDEVICEHEIGHTPOINTS=459"
*End
*PageSize EnvC7/Envelope C7: "%% FoomaticRIPOptionSetting: PageSize=EnvC7"
*FoomaticRIPOptionSetting PageSize=EnvC7: " -dDEVICEWIDTHPOINTS=230 -dDEVICEHEIGHTPOINTS=323"
*End
*CloseUI: *PageSize

*OpenUI *PageRegion: PickOne
*OrderDependency: 100 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
*PageRegion Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive"
*PageRegion Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal"
*PageRegion A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
*PageRegion A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5"
*PageRegion A6/A6: "%% FoomaticRIPOptionSetting: PageSize=A6"
*PageRegion A7/A7: "%% FoomaticRIPOptionSetting: PageSize=A7"
*PageRegion EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5"
*PageRegion EnvISOB6/Envelope B6: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB6"
*PageRegion EnvISOB7/Envelope B7: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB7"
*PageRegion B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5"
*PageRegion B6/B6 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B6"
*PageRegion B7/B7 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B7"
*PageRegion Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10"
*PageRegion EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL"
*PageRegion EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch"
*PageRegion EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5"
*PageRegion EnvC6/Envelope C6: "%% FoomaticRIPOptionSetting: PageSize=EnvC6"
*PageRegion EnvC7/Envelope C7: "%% FoomaticRIPOptionSetting: PageSize=EnvC7"
*CloseUI: *PageRegion

*DefaultPaperDimension: A4
*PaperDimension Letter/US Letter: "612 792"
*PaperDimension Executive/Executive: "522 756"
*PaperDimension Legal/US Legal: "612 1008"
*PaperDimension A4/A4: "595 842"
*PaperDimension A5/A5: "420 595"
*PaperDimension A6/A6: "298 420"
*PaperDimension A7/A7: "210 298"
*PaperDimension EnvISOB5/Envelope B5: "499 709"
*PaperDimension EnvISOB6/Envelope B6: "354 499"
*PaperDimension EnvISOB7/Envelope B7: "250 354"
*PaperDimension B5/B5 (JIS): "516 729"
*PaperDimension B6/B6 (JIS): "363 516"
*PaperDimension B7/B7 (JIS): "258 363"
*PaperDimension Env10/Envelope #10: "297 684"
*PaperDimension EnvDL/Envelope DL: "312 624"
*PaperDimension EnvMonarch/Envelope Monarch: "279 540"
*PaperDimension EnvC5/Envelope C5: "459 649"
*PaperDimension EnvC6/Envelope C6: "323 459"
*PaperDimension EnvC7/Envelope C7: "230 323"

*DefaultImageableArea: A4
*ImageableArea Letter/US Letter: "18 36 594 756"
*ImageableArea Executive/Executive: "18 36 504 720"
*ImageableArea Legal/US Legal: "18 36 594 972"
*ImageableArea A4/A4: "18 36 577 806"
*ImageableArea A5/A5: "18 36 402 559"
*ImageableArea A6/A6: "18 36 280 384"
*ImageableArea A7/A7: "18 36 192 262"
*ImageableArea EnvISOB5/Envelope B5: "18 36 481 673"
*ImageableArea EnvISOB6/Envelope B6: "18 36 336 463"
*ImageableArea EnvISOB7/Envelope B7: "18 36 232 318"
*ImageableArea B5/B5 (JIS): "18 36 498 693"
*ImageableArea B6/B6 (JIS): "18 36 345 480"
*ImageableArea B7/B7 (JIS): "18 36 240 327"
*ImageableArea Env10/Envelope #10: "18 36 279 648"
*ImageableArea EnvDL/Envelope DL: "18 36 294 588"
*ImageableArea EnvMonarch/Envelope Monarch: "18 36 261 504"
*ImageableArea EnvC5/Envelope C5: "18 36 441 613"
*ImageableArea EnvC6/Envelope C6: "18 36 305 423"
*ImageableArea EnvC7/Envelope C7: "18 36 212 287"
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top