ã»ãã³ã¤ã¬ãã³ã®ãããããªã³ããMac OS XãLinuxã*BSDãªã©ã§ä»®æ³ããªã³ã¿ã¨ãã¦ä½¿ã
以åãCUPSからネットプリントに出力する簡単なプログラムãç´¹ä»ããããæè¿ãããåããªããªã£ãã¨ã³ã¡ã³ããé ããã®ã§ãè²ã æ¸ãç´ãã¦ã¿ãã
ä»çµã¿
CUPS-PDFã§PDFãã¡ã¤ã«ãçæãããããセブンイレブンのネットプリントサービスã«æããã ããAPIã¯ç¨æããã¦ããªãã®ã§CGIãç´æ¥å©ãã
ããæ¹
ã¢ã«ã¦ã³ãåå¾
http://www.printing.ne.jp/register/index.html ã«ã¢ã¯ã»ã¹ãã¦ã¦ã¼ã¶IDã¨ãã¹ã¯ã¼ããåå¾ããã
CUPS-PDFã®ã¤ã³ã¹ãã¼ã«
ã¾ãCUPS-PDFãã¤ã³ã¹ãã¼ã«ããã
Linux/*BSDã§ããã°åãã£ã¹ããªãã¥ã¼ã·ã§ã³ã®ããã±ã¼ã¸ã¾ãã¯本家サイトã«ããtarball/rpmãã¤ã³ã¹ãã¼ã«ãgentooã¯emerge cups-pdfã§okã
Mac OS Xã¯CUPS-PDF for Mac OS Xããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ã
CUPS-PDFã®è¨å®
次ã®Perlããã°ã©ã ãä»»æã®å ´æã«ç½®ããããã§ã¯/usr/local/bin/cups-pdf-netprint.plãæ³å®ã
ãã®ãã¡ãã¦ã¼ã¶ã¼IDã¨ãã¹ã¯ã¼ãã¨æ¸ãããé¨åãå ã»ã©åå¾ããã¢ã«ã¦ã³ãæ å ±ã«æ¸ãæãããã¡ã¼ã«ã¢ãã¬ã¹ã«ã¯å°å·ã«å¿ è¦ãªããªã³ãäºç´çªå·ãå±ãã®ã§æºå¸¯ç«¯æ«ã§è¦ãããã¡ã¼ã«ã¢ãã¬ã¹ããªã¹ã¹ã¡ã
è¨ç½®å¾ã/etc/cups/cups-pdf.confã«ããã°ã©ã ãèªåçã«å¼ã³åºãããããã«è¨å®ããã
# vi /usr/local/bin/cups-pdf-netprint.pl (ã¦ã¼ã¶ã¼ID, ãã¹ã¯ã¼ã, ã¡ã¼ã«ã¢ãã¬ã¹ãè¨å®) # chmod +x /usr/local/bin/cups-pdf-netprint.pl # echo "PostProcessing /usr/local/bin/cups-pdf-netprint.pl" >> /etc/cups/cups-pdf.conf
ããªã³ã¿ã®è¿½å
Linux/*BSDã¯cupsdãèµ·åã
/etc/init.d/cupsd start
http://localhost:631/ ã«ã¢ã¯ã»ã¹ãã¦ãããªã³ã¿ã®è¿½å ã§cups-pdfã追å ããã°ãããPPDã¯tarballã®ä¸ã«å«ã¾ãã¦ãã*1ã
Mac OS Xã§ã¯ãã·ã¹ãã ç°å¢è¨å®ãâãããªã³ã¿ã¨ãã¡ã¯ã¹ããå®è¡ãããªã³ã¿ã®è¿½å ã§CUPS-PDFã表示ãããã
ãã¨ã¯
å°å·ããã ã
注æç¹ã¨TIPS
- ãããããªã³ãã§å°å·ã§ãããã¡ã¤ã«ãµã¤ãºã¯2MBã¾ã§ãCUPS-PDFã§åºåãããPDFãã¡ã¤ã«ã®ãµã¤ãºã対象ãªã®ã§æ³¨æã
- ææãããã°ã©ã ãªã®ã§ã¨ã©ã¼å¦çãå
¥ã£ã¦ãªããå°å·ãã¦ãã¡ã¼ã«ãå±ããªãå ´åã¯æ¬¡ã®ç¹ã確èªãããã¨ã
- ã¦ã¼ã¶IDããã¹ã¯ã¼ããééã£ã¦ãªãã
- ã¡ã¼ã«éä¿¡å ãã£ã«ã¿çãããã¦ãªãã
- ãã¼ã¸æ°ãå¤ããã®ãç»åãå¤ããã®ãå°å·ãããã¨ãã¦ããªãã*2
- ã«ã©ã¼ãä¸è¦ãªå ´åã¯grayscale Postscript Driverãªppdã«å·®ãæ¿ããæããããppdã®å·®ãæ¿ãã¯Mac OS Xã§ãå¯è½ã
TODO
- ææãã®ããç°¡æã¹ã¯ã¬ã¤ãã³ã°ãããã¦ããªã
- Web::Scraperãã¤ã³ã¹ãã¼ã«ããã¦ãªãç¶æ³ã§ãåãããããã«ä¾åé¢ä¿ãæä½éã«ãã
- ãã¨ã§Web::Scraperã§æ¸ãç´ãããã¨ãã
- ãããããªã³ãã¸ã®éä¿¡æã«ã¨ã©ã¼ãçºçããå ´åã®å¯¾å¦ãããã¦ãªã
- ã¦ã¼ã¶åããã¹ã¯ã¼ããééã£ã¦ããå ´å
- ãã¡ã¤ã«ãµã¤ãºã2048KBãè¶ ããå ´å
- ãããããªã³ãã®CGIã«ã¢ã¯ã»ã¹ã§ããªãã£ãå ´å
- Growl::Anyã¾ãã¯ã¡ã¼ã«ã§éç¥ãã
- æçµçã«ã¯PDFãä»ããcups-netprintãä½ãã¹ãï¼
- CGIãå©ãã¦ãã®ã§ä»æ§å¤æ´ãããã¨å¯¾å¦ã§ããªã
- åºåãããPDFã«å¿ãã¦èªåçã«ç¨ç´ãµã¤ãºãã«ã©ã¼ãé¸æããã¨ãããã
- CAM::PDFã使ãã°è¯ãã