Hi all: I have been asked to import all my schematic docs into word, which I know sounds like a fun job, but in fact isn't. To make my life easier, I have devised the following procedure, which you may all use for the same purpose (and/or adapt for use with pcb's, which I will be doing later...):
1. You will need the following installed on your computer to follow these instructions: a. Protel (of course) b. A postcript printer driver that prints to a file; I use the HP 4500 driver so I can print in colour. b. Cygwin c. Ghostscript (the windows version is OK, as long as it's in your $PATH - not sure of URL to d/l this) d. Imagemagick (the windows version is OK, just use the default install and it works - get it from http://www.imagemagick.org or one of the mirrors listed) e. MS Word (of course) 2. Print your schematic to a PS file - if you install a colour printer (eg HP laserjet 4500), you will get a colour file. 3. Using ghostscript, convert the postscript file into a series of png's. (You can actually use any file format here that word will understand, but png's are quite small. The command line for doing the following is as follows: # gs -sDEVICE=png256 -sOutputFile=`basename $f .ps`%02d.png -dNOPAUSE -dBATCH -r300 $f Where $f is of course the postscript file you printed earlier. If you have more than 100 sheets in your schematic document, you might want to change the %02d to %03d. The -r300 line sets the resolution - 300dpi gives reasonable output at manageable file sizes. 4. Now, you may rotate the images, so that they come out properly on a landscape-formatted word page (don't ask *me* why, this is just what I was asked to do by my boss). Use the following cygwin command lines for this: for g in *.png ; do echo $g mogrify -rotate 90 $g done 5. Now, import the png files into Word, using the Insert->Picture->From File menu item (or add it to the toolbar). I'm sure someone could write a VB macro to do all the png files in a directory, but I can't be bothered doing this... 6. You can of course put it all into a script, as I have done: ======8><----------------------------------------------------------- #!/bin/bash # Script to create a set of nice png images from a postscript file, # generally generated from Protel. # usage: makepng <file.ps> # # If you omit <file.ps>, it barfs # for f in $@ ; do gs -sDEVICE=png256 -sOutputFile=`basename $f .ps`%02d.png -dNOPAUSE -dBATCH -r300 $f done for g in *.png ; do echo $g mogrify -rotate 90 $g done ======8><----------------------------------------------------------- Excuse the long line (starting with 'gs'), if it's wrapped you'll have to fix the wrapping manually - the windows version of gs doesn't seem to like lines broken with the standard '\' line-joins. Note this method will also work for solidworks drawings, or anything else that can be printed. Enjoy! Cheers, Matthew van de Werken Electronics Engineer CSIRO Exploration & Mining - Gravity Group 1 Technology Court - Pullenvale - Qld - 4069 ph: (07) 3327 4685 fax: (07) 3327 4455 email: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * To post a message: mailto:proteledaforum@;techservinc.com * * To leave this list visit: * http://www.techservinc.com/protelusers/leave.html * * Contact the list manager: * mailto:ForumAdministrator@;TechServInc.com * * Forum Guidelines Rules: * http://www.techservinc.com/protelusers/forumrules.html * * Browse or Search previous postings: * http://www.mail-archive.com/proteledaforum@;techservinc.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
