Pdf Hacks Free Open Book

Pdf Hacks

Origami Paper Planes
Paper Airplane Origami Boats. Learn hot to flod this crafts
Previous Section  < Day Day Up >  Next Section

Hack 44 Share a PDF Network Printer with Samba

figs/expert.gif figs/hack44.gif

Share a PDF printer with your entire network using Ghostscript, Samba, and Linux.

Ghostscript lets you freely print to PDF. However, maintaining Ghostscript on every client in your enterprise can be a nuisance. Consider installing it on a single Linux server instead. Then, use Samba to share it as a PDF printer to your entire network.

Before creating a PDF printer server, install a local PDF printer [Hack #39] to test Ghostscript and make sure it fits your requirements. Note that some Linux distributions provide GNU Ghostscript (Version 7) instead of the more recent AFPL Ghostscript (Version 8). Factor this into your testing. You will probably want to compile AFPL Ghostscript for your Linux server, later.

4.14.1 The Server

Every Linux distribution should have Samba and Ghostscript packages that you can install painlessly. Use them. Later, consider downloading and compiling the latest AFPL Ghostscript.

Samba is powerful, so its configuration requires some skill and patience. Consult man smb.conf and edit smb.conf to suit your network. Exercise your favorite Internet search engine, and drop by http://us3.samba.org/samba/docs/using_samba/toc.html. When things aren't working, consult the log files (e.g., /var/log/samba). Don't forget to restart the samba service (e.g., /etc/init.d/samba restart) after changing smb.conf.

Create the directory /home/pdf_printer/output, and chmod it to 777. This is where new PDFs will be delivered. Share this directory with your network by adding this section to smb.conf and restarting Samba:

[pdf_output]

comment = Shared PDF Printer Output

path = /home/pdf_printer/output

; this next line is necessary only when security = share

guest ok = yes

browseable = yes

writeable = yes

In Windows, this share should be visible from the Network Neighborhood or My Network Places, as shown in Figure 4-16. If not, try digging into Entire Network Microsoft Windows Network. Also try the Search for Computers or Find Computer features. Sometimes, new resources aren't visible immediately. Sometimes, client configurations must be reviewed and changed, too.

Figure 4-16. A few ways to find shared network resources in Windows
figs/pdfh_0416.gif


Now, let's add a PDF Printer to Samba. Once you get it working, adapt the settings to your requirements. Maybe these settings are all you will need.

Download samba-print-pdf from http://ranger.dnsalias.com/mandrake/samba/, copy it into your server's /usr/local/bin directory, and chmod it to 755. Open this script in an editor to see what it does, and possibly change things, such as its Ghostscript OPTIONS.

Add the following section to smb.conf. It should work with Samba's share security model (security = share) or user security model (security = user). The user security model requires that a user provide a name and password before accessing the printer.

[pdf_printer]

comment = Shared PDF Printer

path = /tmp

; this next line is necessary only when security = share

guest ok = yes

printable = yes

use client driver = yes

print command = /usr/local/bin/samba-print-pdf %s \

/home/pdf_printer/output //%L/pdf_output %m %I "%J" &

lpq command =

lprm command =

Restart Samba and then try accessing the file share pdf_output from a client machine. If that works, you are ready to install the client printer.

4.14.2 The Windows Client

Install the Virtual Printer Kit (VPK) [Hack #39]. Right-click our network printer, pdf_printer, under My Network Places in the File Explorer. Select Connect . . . , and click OK. The Add Printer Wizard will open and ask which printer driver to install. Click Have Disk, browse over to the VPK printer driver that suits your client platform, and click OK. Select the Virtual PostScript Printer driver and click OK. Your new PDF network printer will appear in the computer's Printers folder. Print a test page to make sure it works properly.

Later, copy these Virtual PostScript Printer files to the pdf_output share so that you can access them easily across your network.

    Previous Section  < Day Day Up >  Next Section
    Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][L][M][N][O][P][Q][R][S][T][U][V][W][X][Z]

    Origami Paper AirPlane
    Paper Airplane Origami Boats

         Main Menu
    PDF Hacks
    Table of Contents
    Copyright
    Credits
    Preface
    Chapter 1. Consuming PDF
    Chapter 2. Managing a Collection
    Chapter 3. Authoring and Self-Publishing: Hacking Outside the PDF
    Chapter 4. Creating PDF and Other Editions
    Introduction: Hacks #32-50
    Hack 32 Create Interactive PDF with Your Word Processor
    Hack 33 Create a Printable, On-Screen Edition from Word
    Hack 34 Multipurpose PDF
    Hack 35 Create an HTML Edition from Your Word Processor
    Hack 36 Create a Handheld Edition from Your HTML
    Hack 37 Convert Documents from Tools You Don't Own to PDF
    Hack 38 Acrobat Distiller and Its Profiles
    Hack 39 Print to PDF with Ghostscript and RedMon on Windows
    Hack 40 Save As PDF with Mac OS X
    Hack 41 Maximize PDF Portability
    Hack 42 Configure Distiller and Ghostscript for Your Purpose
    Hack 43 Embed and Subset Fonts to Your Advantage
    Hack 44 Share a PDF Network Printer with Samba
    Hack 45 Print to Image and Other Rasterizing Options
    Hack 46 Print to SVG
    Hack 47 Print Over the Internet
    Hack 48 Create a PDF Album of Your Digital Pictures
    Hack 49 Print to Fax on Windows
    Hack 50 Convert Incoming Faxes to PDF on Linux
    Chapter 5. Manipulating PDF Files
    Chapter 6. Dynamic PDF
    Chapter 7. Scripting and Programming Acrobat
    Colophon
    Index


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplane
    Paper Airplane - Paper Airplane - Paper Airplane - Paper Airplane - Paper Airplane - Paper Airplane - Paper Airplane - Paper Airplane -