¸ÕÀú ÀÛ¾÷ Àüü¸¦ »ìÆ캸ÀÚ. ¸ÕÀú, ¿ì¸®´Â Samba¸¦ »ç¿ëÇÏ¿© (»ç¿ëÀÚ¿¡°Ô º¸Åë ÇÁ¸°ÅÍó·³ º¸ÀÌ´Â) "°¡»ó ÇÁ¸°ÅÍ" ¼ºñ½º¸¦ Á¦°øÇÑ´Ù. Ghostscript´Â ÀÌ Æ÷½ºÆ®½ºÅ©¸³Æ® ÇÁ¸°ÅÍÀÇ ÀÛ¾÷À» PDF ¹®¼·Î ¸¸µç´Ù. ¸¶Áö¸·À¸·Î À©µµ¿ì°¡ ÀÌ °øÀ¯ ÇÁ¸°Å͸¦ »ç¿ëÇϵµ·Ï ¼³Á¤ÇÑÈÄ, ÀÛ¾÷À» Æ÷½ºÆ®½ºÅ©¸³Æ® Çü½ÄÀ¸·Î º¸³½´Ù.
óÀ½ Samba¸¦ ¼³Ä¡Çغ»´Ù¸é (/etc³ª /etc/samba¿¡ ÀÖ´Â) smb.confÀÇ ±âº» ¼³Á¤ ¿É¼ÇÀ» »ìÆ캸°í ¼öÁ¤ÇÒ ÇÊ¿ä°¡ ÀÖ´Ù. ¼ºñ½º¸¦ ½ÃÀÛÇϱâÀ§ÇØ ÁÖ·Î »ìÆ캼 °ÍÀº º¸¾È Á¤Ã¥(security=share ȤÀº security=user)°ú "guest account" ¼³Á¤ÀÌ´Ù. Samba¸¦ ¼³Á¤¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº www.samba.orgÀÇ Samba ¹®¼³ª SMB HOWTO¸¦ Âü°íÇ϶ó. (º¸¾ÈÁ¤µµ´Â ³·Àº) ¿ÏÀüÇÑ ¼³Á¤ÆÄÀÏ ¿¹°¡ ¾Æ·¡ ³ª¿Â´Ù.
°£´ÜÇÑ ÆÄÀÏ°øÀ¯¸¦ ¸¸µé¾î¼ ¿¬°á°ú (ÀÖ´Ù¸é) ÀÎÁõ¹æ¹ýÀ» °Ë»çÇغ¸±æ ¹Ù¶õ´Ù. Ŭ¶óÀ̾ðÆ®°¡ Samba ¼¹ö¿¡ Á¢¼ÓÀÌ °¡´ÉÇÏ´Ù¸é, ÀÌÁ¦ PDF "°¡»ó ÇÁ¸°ÅÍ"¸¦ ¸¸µé Â÷·Ê´Ù. ±×·¯³ª ¸ÕÀú ½ÇÁ¦ PDF ¹®¼¸¦ ¸¸µé±âÀ§ÇÑ µµ±¸°¡ ÀÖ´ÂÁö È®ÀÎÇØ º¸ÀÚ.
Ghostscript ÆÐÅ°Áö¿¡¼ Æ÷½ºÆ®½ºÅ©¸³Æ®¸¦ PDF·Î ½±°Ô º¯È¯ÇÏ´Â ps2pdf¶ó´Â ½ºÅ©¸³Æ®¸¦ ãÀ» ¼ö ÀÖ´Ù. ÀÌÁ¦ ÀÌ µµ±¸°¡ ÀÖ´Ù¸é Samba¿¡ PDF ¼ºñ½º¸¦ ¸¸µé¾îº¸ÀÚ.
[hpdeskjet] path = /tmp printable = yes writeable = no create mask = 0700 guest ok = yes printer name = lp
(writeable
¿¡¼ "e"¸¦ ÁÖÀÇÇ϶ó. º¸Åë ´Ü¾î¿Í
´Þ¸® ¼³Á¤ÆÄÀÏ¿¡¼´Â "e"°¡ ÀÖ´Ù. ÀÌ´Â ¾Æ·¡ browseable
¿¡µµ
Àû¿ëµÈ´Ù. ½ÇÁ¦·Î Samba¿¡¼ µÎ°¡Áö ´Ù °¡´ÉÇÏÁö¸¸, Samba manpage´Â
writeable
À» »ç¿ëÇÑ´Ù.)
º¸Åë ÇÁ¸°ÅÍ ÀÛ¾÷ÀÌ ÀÌ °øÀ¯¿¡ ½ºÇ®µÉ¶§ ÀÛ¾÷À» ¸®´ª½º ÇÁ¸°Æà ½Ã½ºÅÛÀ¸·Î ¿Å±â±âÀ§ÇØ lpr°ú °°Àº ¸í·É¾î°¡ ½ÇÇàµÈ´Ù. ¿©±â¼ ¿ì¸®´Â lpr ´ë½Å ´Ù¸¥ ÇÁ¸°Æ® ¸í·É¾î¸¦ ÁöÁ¤Çϱâ À§Çؼ SambaÀÇ ¼³Á¤À» ¹Ù²Û´Ù. Á¤È®ÇÑ ¼³Á¤º¯¼ö´Â "print command"ÀÌ´Ù. ÁöÁ¤ÇÑ ¸í·É¾î°¡ ½ÇÇàµÉ¶§ "print command" º¯¼ö¿¡¼ %f³ª %s´Â ¿øµµ¿ì Ŭ¶óÀ̾ðÆ®°¡ º¸³½ ÇÁ¸°ÅÍ ½ºÇ® ÆÄÀϸíÀ¸·Î ´ëüµÈ´Ù. ¿¹¸¦ µé¾î ÇÁ¸°ÅÍ ÀÛ¾÷À» ±×³É ¹«½ÃÇÏ·Á¸é, À§ÀÇ ÇÁ¸°ÅÍ ¼³Á¤À» ´ÙÀ½°ú °°ÀÌ ¹Ù²Û´Ù.
print command = /bin/rm %f¿©±â¼ ÁÖÀÇÇÒ Á¡ÀÌ ÀÖ´Ù. ¾î¶² ÀÛ¾÷À» ÁöÁ¤ÇÏ´øÁö ½ºÇ® ÆÄÀÏÀ» ¹Ýµå½Ã Áö¿ö¾ß ÇÑ´Ù. Áö¿ìÁö ¾ÊÀ¸¸é ÆÄÀϵéÀÌ °á±¹ µð½ºÅ©¸¦ ´Ù Â÷ÁöÇÏ°Ô µÈ´Ù.
chown nobody /shr/pdfdropbox chmod u+rwx /shr/pdfdropboxprintpdf¶ó´Â °£´ÜÇÑ ÇÁ¸°Æ® ½ºÅ©¸³Æ®°¡ ¿©±â¿¡ ÀÖ´Ù. ¸®´ª½º¿¡¼ ÀÌ ½ºÅ©¸³Æ®¸¦ /usr/bin/printpdf·Î ¿Å±ä´Ù.
#!/bin/sh # Simple script to convert a specified postscript file into a PDF document # and place it in a location that is shared by the Samba server. # # Arguments: # 1st - The name of the spool file # # John Bright, 2001, jbright@winfordeng.com # We will create the pdf into a temporary file based upon the current date and time. # After we are finished, we'll rename it to a file with the same date, but ending # in .pdf. We do this because if a user tries to open a PDF that is still being written, # they will get a message that it is corrupt, when it is actually just not done yet. DATE=`date +%b%d-%H%M%S` # Directory in which to place the output # Be sure this directory exists and is writable by the user that Samba # is running as (for example, the nobody user) OUTDIR=/shr/pdfdropbox ps2pdf $1 $OUTDIR/$DATE.temp mv $OUTDIR/$DATE.temp $OUTDIR/$DATE.pdf rm $1
(¿ªÁÖ; Çѱ۷ΠµÈ ÆÄÀÏ¸í¿¡ ¹®Á¦°¡ ÀÖ´Ù¸é, DATE=`LC_ALL=C date +%b%d-%H%M%S`¿Í °°ÀÌ ½ºÅ©¸³Æ®¸¦ ¼öÁ¤Ç϶ó.) ÁøÂ¥ °£´ÜÇÏ´Ù. ÀÌÁ¦ ÇÊ¿äÇÑ µµ±¸¸¦ ¸ðµÎ ÁغñÇß´Ù.
[global] guest account = nobody invalid users = root ; Tighten security just a little: only allow local access interfaces = 127.0.0.1 eth0 bind interfaces only = Yes ; This assumes you are on a local network with 192.168.x.x IP addresses hosts allow = 192.168. ; Share-level security is generally easier, although not as secure security=share workgroup=WORKGROUP ; Set up a public share, this will be used to retrieve PDFs ; The name of the share will be seen as "shr" by Windows users [shr] path = /shr browseable = yes writeable = yes guest ok = yes force user = nobody ; Set up our PDF-creation print service [pdf] path = /tmp printable = yes guest ok = yes print command = /usr/bin/printpdf %s ; There is no need to support listing or removing print jobs, ; since the server begins to process them as soon as they arrive. ; So, we set the lpq (list queued jobs) and lprm (remove jobs in queue) ; commands to be empty. lpq command = lprm command =
¹°·Ð ¼³Á¤ÆÄÀÏ smb.confÀ» ¼öÁ¤ÇÑÈÄ Samba¸¦ Àç½ÃÀÛÇØ¾ß ÇÑ´Ù.
°£´ÜÈ÷ ¸»Çؼ ¸®´ª½º ¸Ó½®ÀÇ PDF ¼ºñ½º´Â ÀÔ·ÂÀ» Æ÷½ºÆ®½ºÅ©¸³Æ® Çü½ÄÀ¸·Î ¹Þ´Â´Ù. printpdf ½ºÅ©¸³Æ®°¡ À©µµ¿ì Ŭ¶óÀ̾ðÆ®°¡ º¸³½ ÀÛ¾÷À» ±×´ë·Î ¹Þ±â¶§¹®¿¡ À©µµ¿ì Ŭ¶óÀ̾ðÆ®´Â Æ÷½ºÆ®½ºÅ©¸³Æ® Çü½ÄÀ¸·Î ÇÁ¸°ÅÍ ÀÛ¾÷À» º¸³»¾ß ÇÑ´Ù. ±×·¡¼ À©µµ¿ì Ŭ¶óÀ̾ðÆ®¿¡ PDF ³×Æ®¿÷ ÇÁ¸°Å͸¦ ¼±ÅÃÇÒ¶§ Æ÷½ºÆ®½ºÅ©¸³Æ® ÇÁ¸°ÅÍ¿ë µå¶óÀ̹ö¸¦ ¼±ÅÃÇÑ °ÍÀÌ´Ù. ³ª´Â ÀϹÝÀûÀ¸·Î À©µµ¿ì ÇÁ¸°ÅÍ µå¶óÀ̹ö ¸ñ·Ï¿¡¼ (HP LaserJet 5P/5MP Postscript¿Í °°ÀÌ) HP Laserjet PS ÇÁ¸°ÅÍ°è¿À» ¼±ÅÃÇÏÁö¸¸ ¸¶ÀÌÅ©·Î¼ÒÇÁÆ®°¡ Á¦°øÇÏ´Â Æ÷½ºÆ®½ºÅ©¸³Æ® µå¶óÀ̹ö´Â ±âº»ÀûÀ¸·Î °°±â¶§¹®¿¡ ¾Æ¹«°ÍÀ̳ª ¼±ÅÃÇصµ µÈ´Ù.
À©µµ¿ì¿¡ PDF ³×Æ®¿÷ ÇÁ¸°Å͸¦ ¼³Ä¡Çß´Ù¸é ¾î¶² ÇÁ·Î±×·¥¿¡¼ »õ·Î¿î ³×Æ®¿÷ ÇÁ¸°ÅÍ·Î Ãâ·ÂÇÏ´õ¶óµµ Àá½ÃÈÄ PDF ¹®¼¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
ÀÌÁ¦ ¾î¶² µå¶óÀ̹ö ÆÄÀÏÀ» printer$ °øÀ¯ µð·ºÅ丮¿¡ º¹»çÇؾßÇÒÁö ¾Ë¾Æ³»¾ß ÇÑ´Ù. ¶Ç Ŭ¶óÀ̾ðÆ®¿¡°Ô ¾î¶² µå¶óÀ̹ö ÆÄÀÏÀÌ ÇÊ¿äÇÑÁö¸¦ ¾Ë·ÁÁÖ´Â ÇÁ¸°ÅÍ Á¤ÀÇ(printer definition)µµ ¸¸µé¾î¾ß ÇÑ´Ù. °í¸¿°Ôµµ make_printerdef ¶ó´Â Samba µµ±¸¸¦ »ç¿ëÇϸé Çѹø¿¡ ÇØ°áµÈ´Ù. ÀÌ µµ±¸¸¦ »ç¿ëÇÏ·Á¸é ÇÁ¸°Å͸¦ Á¤ÀÇÇÏ´Â À©µµ¿ì INF ÆÄÀÏ°ú "HP LaserJet 5P/5MP PostScript"¿Í °°Àº ÇÁ¸°ÅÍ À̸§ÀÌ ÇÊ¿äÇÏ´Ù. ÇÁ¸°ÅÍ°¡ Á¤ÀÇµÈ INF ÆÄÀÏÀÌ ¹«¾ùÀÎÁö¸¦ ¾Ë¾Æ¾ßÇÑ´Ù. ¿¹¸¦ µé¾î, LaserJetÀº C:\WINDOWS\INF\MSPRINT3.INF¿¡ Á¤ÀǵÇÀÖ´Ù. C:\WINDOWS\INF°¡ ¼û±è µð·ºÅ丮ÀÓÀ» ÁÖÀÇÇ϶ó. ÀÌ ÆÄÀÏÀ» ¸®´ª½º¿¡ º¹»çÇÏ°í, Samba°¡ ÀÐÀ» ÇÁ¸°ÅÍ Á¤ÀÇ ÆÄÀÏÀ» ¸¸µé±âÀ§ÇØ make_printerdef¸¦ »ç¿ëÇÑ´Ù. ¿¹¸¦ µé¾î,
make_printerdef MSPRINT3.INF "HP LaserJet 5P/5MP PostScript" >> /etc/samba/printers.def
ÇÁ¸°ÅÍ ¼³Á¤À» ¸¸µé±âÀ§ÇØ Ç¥ÁØÃâ·ÂÀ» printers.def ÆÄÀÏ·Î ¸®´ÙÀÌ·ºÆ®ÇÑ´Ù. make_printdef ÇÁ·Î±×·¥Àº Ç¥ÁØ¿À·ù·Îµµ ¼³¸íÀ» Ãâ·ÂÇÑ´Ù. ÀÌ ÇÁ·Î±×·¥Àº ÇÊ¿äÇÑ µå¶óÀ̹ö ÆÄÀÏÀÌ ¹«¾ùÀÎÁö ¾Ë·ÁÁØ´Ù. ÀÌ ÆÄÀÏÀ» C:\WINDOWS\SYSTEMÀ̳ª C:\WINDOWS¿¡¼ ãÀ»ÈÄ ¸®´ª½ºÀÇ printer$ °øÀ¯ °æ·Î(ÀÌ ¿¹¿¡¼´Â /etc/samba/printerdrivers)¿¡ º¹»çÇØ¾ß ÇÑ´Ù. »ý¼ºÇÑ (¾Æ´Ï¸é Ãß°¡ÇÑ) printers.def ÆÄÀÏÀº À©µµ¿ì¿Í °øÀ¯ÇÒ ÇÊ¿ä´Â ¾ø´Ù. ÀÌ ÆÄÀÏÀº Samba¸¸ÀÌ Àд´Ù. ÀÌÁ¦ Samba¿¡°Ô printers.def ÆÄÀÏ°ú µå¶óÀ̹ö ÆÄÀÏ¿¡ ´ëÇØ ¾Ë·ÁÁØ´Ù. ÀÌ´Â smb.conf¿¡¼ global ¼½¼ÇÀÇ "printer driver file" ¼³Á¤°ú °¢ ÇÁ¸°ÅÍ ¼½¼Ç¿¡¼ "printer driver", "printer driver location" ¼³Á¤À¸·Î °¡´ÉÇÏ´Ù. ´ÙÀ½Àº ¼öÁ¤ÇÑ smb.conf ÆÄÀÏ·Î printer$ °øÀ¯ÀÇ ¿¹¸¦ º¸¿©ÁØ´Ù. ¿©±â¿¡¼ ÀÌ ¼³Á¤ÆÄÀÏÀ» ¹ÞÀ» ¼ö ÀÖ´Ù.
[global] guest account = nobody invalid users = root ; Tighten security just a little: only allow local access interfaces = 127.0.0.1 eth0 bind interfaces only = Yes ; This assumes you are on a local network with 192.168.x.x IP addresses hosts allow = 192.168. ; Share-level security is generally easier, although not as secure security=share workgroup=WORKGROUP printer driver file = /etc/samba/printers.def ; Set up a public share, this will be used to retrieve PDFs ; The name of the share will be seen as "shr" by Windows users [shr] path = /shr browseable = yes writeable = yes guest ok = yes force user = nobody ; Set up our PDF-creation print service [pdf] path = /tmp printable = yes guest ok = yes print command = /usr/bin/printpdf %s ; There is no need to support listing or removing print jobs, ; since the server begins to process them as soon as they arrive. ; So, we set the lpq (list queued jobs) and lprm (remove jobs in queue) ; commands to be empty. lpq command = lprm command = ; We already defined the printer driver definition file above. ; Here we need to specify the entry in that file that should be used ; for this printer. printer driver = HP LaserJet 5P/5MP PostScript printer driver location = \\%h\printer$ ; File share to allow clients to download printer drivers [printer$] path = /etc/samba/printdrivers guest ok = yes read only = yes
¸®´ª½º¿¡¼ À©µµ¿ì ÇÁ¸°ÅÍ °øÀ¯¿¡ ÇÁ¸°Æ®ÇÏ´Â ¹æ¹ýÀº ¸¹´Ù. ¾Æ¸¶µµ °¡Àå ÁÁÀº ¹æ¹ýÀº /etc/printcap¿¡ ÇÊÅÍ·Î (smbclient¸¦ »ç¿ëÇÏ´Â) smbprint ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÏ´Â °ÍÀÌ´Ù. ÀÌ ¹æ¹ýÀ» »ç¿ëÇÏ¸é ¸®´ª½º »ç¿ëÀÚ¿Í ÇÁ·Î±×·¥¿¡ Àͼ÷ÇÑ Ç¥ÁØ lpr ¸í·É¾î·Î À©µµ¿ì °øÀ¯ ÇÁ¸°ÅÍ¿¡ ÇÁ¸°Æ®ÇÒ ¼ö ÀÖ´Ù. ÄÄÇ»ÅÍ¿¡ smbprint¿Í smbclient ÇÁ·Î±×·¥ÀÌ ÀÖ´ÂÁö È®ÀÎÇ϶ó. smbclient ÇÁ·Î±×·¥Àº DebianÀÇ "smbclient" ÆÐÅ°Áö¿Í Red HatÀÇ "samba-client" ÆÐÅ°Áö¿¡¼ ãÀ» ¼ö ÀÖ´Ù. Red Hat¿¡¼ smbprint ½ºÅ©¸³Æ®´Â "samba-client" ÆÐÅ°Áö¿¡ Æ÷ÇÔµÇÀÖ´Ù. Debian¿¡¼´Â "samba-doc" ÆÐÅ°Áö¿Í "printfilters-ppd", "lprngtool" ÆÐÅ°Áö¿¡ ¼·Î ´Ù¸¥ ¹öÀüÀÌ ÀÖ´Ù. ¼·Î ´Ù¸¥ ¸¹Àº ¹öÀüµéÀÌ ÀÖ¾î¼ ¿©±â¿¡ ÀÖ´Â °ÍÀ» º¹»çÇÏ´Â ÆíÀÌ ³´´Ù. ¿©±â¿¡¼ ¹ÞÀ» ¼ö ÀÖ´Ù. ÀÌÁ¦ /usr/bin/smbprint¿¡ smbprint°¡ ÀÖ°í ½ÇÇà°¡´ÉÇÏ´Ù°í (chmod +x /usr/bin/smbprint) °¡Á¤ÇÑ´Ù. ´ÙÀ½Àº smbprint ½ºÅ©¸³Æ®ÀÌ´Ù.
#!/bin/sh # This script is an input filter for printcap printing on a UNIX machine. It # uses the smbclient program to print the file to the specified smb-based # server and service. # For example you could have a printcap entry like this # # smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint # # which would create a UNIX printer called "smb" that will print via this # script. You will need to create the spool directory /usr/spool/smb with # appropriate permissions and ownerships for your system. # Set these to the server and service you wish to print to # In this example I have a Windows for Workgroups PC called "lapland" that has # a printer exported called "printer" with no password. # # Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) # so that the server, service, and password can be read from # a /usr/var/spool/lpd/PRINTNAME/.config file. # # In order for this to work the /etc/printcap entry must include an # accounting file (af=...): # # cdcolour:\ # :cm=CD IBM Colorjet on 6th:\ # :sd=/var/spool/lpd/cdcolour:\ # :af=/var/spool/lpd/cdcolour/acct:\ # :if=/usr/local/etc/smbprint:\ # :mx=0:\ # :lp=/dev/null: # # The /usr/var/spool/lpd/PRINTNAME/.config file should contain: # share=PC_SERVER # user="user" # password="password" # # Please, do not modify the order in the file. # Example: # share=\\server\deskjet # user="fred" # password="" # # The last parameter to the filter is the accounting file name. # Extract the directory name from the file name. # Concatenate this with /.config to get the config file. # eval acct_file=\$$# spool_dir=`dirname $acct_file` config_file=$spool_dir/.config # Should read the following variables set in the config file: # share # hostip # user # password eval `cat $config_file` share=`echo $share | sed "s/[\]/\//g"` if [ "$user" != "" ]; then usercmd="-U" else usercmd="" fi if [ "$workgroup" != "" ]; then workgroupcmd="-W" else workgroupcmd="" fi if [ "$translate" = "yes" ]; then command="translate ; print -" else command="print -" fi #echo $share $password $translate $x_command > /tmp/smbprint.log cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \ $hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \ -c "$command" 2>/dev/null
´ÙÀ½Àº /etc/printcap¿¡ »õ·Î¿î Ç׸ñÀ» Ãß°¡ÇÏ°í smbprint ½ºÅ©¸³Æ®¸¦ ÇÊÅÍ·Î ÁöÁ¤ÇÏ´Â ÀÏÀÌ´Ù. ¿©±â printcap Ç׸ñÀÇ ¿¹°¡ ÀÖ´Ù. ¿©±â¿¡¼ ¹ÞÀ» ¼ö ÀÖ´Ù.
# PDF Service entry lp|pdf|PDF Printer:\ :lp=/dev/null:sh:\ :sd=/var/spool/lpd/pdf:\ :af=/var/spool/lpd/pdf/acct:\ :mx#0:sh:\ :if=/usr/bin/smbprint:
½ºÇ® µð·ºÅ丮 /var/spool/lpd/pdf/¸¦ ¸¸µé¾î¶ó. (ȤÀº LPRng¸¦ »ç¿ëÇÑ´Ù¸é, checkpc -f¸¦ ½ÇÇàÇ϶ó.) printcap Ç׸ñ¿¡ ¾îÄ«¿îÆ® ÆÄÀÏ ÁÙ(af=...)À» È®ÀÎÇ϶ó. smbprint ½ºÅ©¸³Æ®°¡ .config ÆÄÀÏÀ» ã±âÀ§Çؼ ¾îÄ«¿îÆ® ÆÄÀÏÀÌ .config ÆÄÀÏ°ú °°Àº µð·ºÅ丮¿¡ ÀÖ¾î¾ß ÇÑ´Ù. ¶Ç ±âº» ÇÁ¸°Å͸íÀÎ "lp"¸¦ »ç¿ëÇÏ¿´´Ù. ¸¸¾à ÀÌ¹Ì /etc/printcap ÆÄÀÏÀÌ ÀÖ°í ±âÁ¸ÀÇ ±âº» ÇÁ¸°Å͸¦ À¯ÁöÇÑ´Ù¸é, À§¿¡¼ ¾ÕÀÇ "lp|"¸¦ Áö¿ö¾ßÇÑ´Ù. ´ÙÀ½À¸·Î ¼³Á¤ÆÄÀÏ ".config"¸¦ ¸¸µç´Ù. ÀÌ ÆÄÀÏÀº /var/spool/lpd/pdf/.config ¿¡ ÀÖ¾î¾ß ÇÑ´Ù. .config ÆÄÀÏÀº ÇÁ¸°ÅÍ ÀÛ¾÷À» º¸³¾ ¼¹ö¸¦ ÁöÁ¤ÇÑ´Ù. ¿¹¸¦ µé¾î,
share=//yourserver/pdf user="" password=""
¿©±â¼ PDF ¼ºñ½º¸¦ Á¦°øÇÏ´Â ÄÄÇ»Å͸íÀ¸·Î yourserver¸¦ ¹Ù²Û´Ù. µ¿ÀÛÇÏÁö ¾ÊÀ¸¸é Ȥ½Ã smbprint ½ºÅ©¸³Æ®°¡ .config ÆÄÀÏÀ» ÀÐÀ» ±ÇÇÑÀÌ ÀÖ´ÂÁö È®ÀÎÇغÁ¶ó. ÃÖ¼ÒÇÑ Ã³À½¿¡ °¡Àå È®½ÇÇÑ ¹æ¹ýÀº chmod a+r /var/spool/lpd/pdf/.config ¿Í °°ÀÌ ¸ðµÎ¿¡°Ô Àб⠱ÇÇÑÀ» ÁÖ´Â ¹æ¹ýÀÌ´Ù. (¿ªÁÖ; .config ÆÄÀÏÀº »ç¿ëÀÚ¸í°ú ¾ÏÈ£°¡ ÀúÀåµÇÀֱ⠶§¹®¿¡ Á¶½ÉÇØ¾ß ÇÑ´Ù.)
¸¶Áö¸·À¸·Î ´ÙÀ½°ú °°ÀÌ ¸®´ª½º¿¡¼ Æ÷½ºÆ®½ºÅ©¸³Æ® ÆÄÀÏÀ» PDF ¼ºñ½º·Î ÇÁ¸°Æ®ÇÒ ¼ö ÀÖ´Ù.
lpr -Ppdf file_to_print.psÀÌ ¹æ¹ýÀº ¸¹Àº ÇÁ·Î±×·¥¿¡¼ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ¿¹¸¦ µé¾î, Netscape¿¡¼ ÇÁ¸°Æ® ¸í·É¾î·Î "lpr -Ppdf"¸¦ »ç¿ëÇϸé À¥ÆäÀÌÁö¸¦ PDF ¹®¼·Î ¸¸µé ¼ö ÀÖ´Ù.
»ç°ßÀ¸·Î »ç¿ëÀÚ È¯°æÀº gnome-gv°¡ Á¦ÀÏ ÁÁÀº °Í °°´Ù. GTK+¸¦ ±â¹ÝÀ̱⠶§¹®¿¡ Ưº°È÷ ½Å°æ¾²Áö¾Ê¾Æµµ ¸¶¿ì½ºÈÙ µîÀÌ ÀÛµ¿ÇÑ´Ù. ºÒÇàÈ÷µµ ¸øÀд PDF ¹®¼°¡ ÀÖ°í, ghostscript°¡ ÁöÀúºÐÇÏ°Ô º¸ÀÌ´Â ¿À·ù¹®À» Ãâ·ÂÇÑ´Ù. ³» °æÇè»ó acroread´Â ¹®¼¸¦ Çؼ®Çϴµ¥ °¡Àå ÁÁ´Ù. °ú°Å¿¡´Â ÇÁ·Î±×·¥ÀÌ Áױ⵵ ÇÏ¿´Áö¸¸ ÇöÀç ¸Å¿ì ÁÁ¾ÆÁ³´Ù. ³ª´Â gv¸¦ »ç¿ëÇÏÁö´Â ¾ÊÁö¸¸ µÑ´Ù ghostscript¸¦ ±â¹ÝÀ¸·Î Çϱ⶧¹®¿¡ gnome-gv°ú °°Àº ¹®Á¦°¡ ÀÖÀ» °Í °°´Ù. ¸¶Áö¸·À¸·Î xpdf´Â ¸Å¿ì ¾ÈÁ¤ÀûÀÌ´Ù. ³ª´Â ÀÌ ÇÁ·Î±×·¥ÀÌ Á×´Â °ÍÀ» ¸øºÃ°í ¹®¼¸¦ Çؼ®Çϴµ¥µµ ¹®Á¦°¡ ¾ø´Ù. ±×·¯³ª ¸î¸î »ç¼ÒÇÑ ¹®Á¦°¡ ÀÖ°í ±â´ÉÀÌ ÀûÀ¸¸ç ¹®¼ÀÇ Ãâ·ÂÁúÀÌ ³·´Ù. ±×·¯³ª »ìÆ캼¸¸ÇÑ ÁÁÀº ÇÁ·Î±×·¥ÀÌ´Ù. °ÌÀ» ¸Ô¾úÀ»Áö ¸ð¸£Áö¸¸ Æò±ÕÀûÀ¸·Î ¸®´ª½º¿¡¼ PDF¸¦ º¸´Â °ÍÀº (¿ªÁÖ; Àû¾îµµ ¿µ¾î±Ç¿¡¼) ¹®Á¦°¡ ¾ø´Ù.
±×·³ Àß ÀÌ¿ëÇÏ±æ ¹Ù¶õ´Ù!
John Bright
John Bright´Â
Winford EngineeringÀÇ
°øµ¿°æ¿µÀÚÀÌ°í ¸ÃÀº ¸®´ª½º °ü¸®¿Í ÇÁ·Î±×·¡¹ÖÀ» Àß ÇÑ´Ù. :)
±×´Â ´ëÇп¡¼ ¸¹Àº ¸®´ª½º¿Í À¯´Ð½º¸¦ °ü¸®Çϸç
¿©·¯ ¸®´ª½º°ü·Ã ÇÁ·ÎÁ§Æ®·Î ¹Ù»Ú´Ù.
Copyright © 2001, John Bright.
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 72 of Linux Gazette, November 2001