These comments come from my patreq front end shell script. # Capture requests for patents that are in our online image directory, /dfs/images. # We cannot send them off to the image server, 'cause they ain't in the image server's # index file (jukebox.parm), so we'll trap them here and handle them ourselves. # # When we're running, the web server sets the REMOTE_ADDR environment variable to the # I.P. address of the user. We use this to determine if we're coming from Delphion, i.e. # REMOTE_ADDR=12.44.168.100 (used to be 205.243.24.69). If so, we don't really print. # # The following can be used to check this. First, # export REMOTE_ADDR=12.44.168.100 # Then to check the code path where we print the patent's image, # patreq -s ips07i:80 -m print -t ps2 -d ps01 -c jasper -L miwo2001001 WO00027932A3 # You can play with the -m, -c, -r, and -u options. # # Or to test the code path where we call the image server to print it, # patreq -s ips07i:80 -m print -t ps2 -d ps01 -c nouser -L miwo2000233 WO09962727A3 # # To make this compatible with other NPO sites, even though we're running an the main # web server, we read the image server config file, /ips/etc/arcpat.cfg, to get some # local variables, For example, patdlv's root, patdlv's tmp directory, and this site's # header template file. ============================================================================================ There are three places one could print from in the IPSfDB2 solution, * The Shopping Basket, run by /ips/httpd/htdocs/macro/V4/basket.d2w. * A Hitlist, run by /ips/httpd/htdocs/macro/V4/hitlist_sql.d2w. * The Bulk Order screen, run by /ips/httpd/htdocs/macro/V4/patnr_bulk.d2w. All three include /ips/htdocs/macro/v4/os_aix.d2w, which defines the following two subroutines, - Dyn_PrnLst, which gives back a list of printers based on userid This is done by calling /ips/cgi-bin/Dyn_PrnLst.pl, includes /ips/include/prn_general.lst, which has the list of possible printers, the first one being the default. - Dyn_PrnOK, which gives back "" if the user is part of printer group. Printer groups start with prn_. This is done by calling /ips/cgi-bin/Dyn_PrnOK.pl The printer name is passed to /ips/bin/patreq via the -d option, so the possible printer names must be defined as real AIX print queues on all front-end web servers and image servers. ============================================================================================ Type /ips/bin/patreq -? to see a quick help on all the patreq options, or /ips/bin/patreq -h to see the full help. This is the full help. (c) Copyright International Business Machines Corporation 1995-1999 Version 4 [Oct 21 1999 16:58:44] patreq.real: [-h] [-o OwnerAddr] [-b Billing] [-r RefID] [-n NotifyAddr] [-t ImageType] [-p] [-P page_range] [-s Server:Port] [-a Option=value] [-A PrintOption=value] [-f FileNameForDelivery] [-l PageLength] [-L Volume_label] [-c UserNameOnCoverPage] [-u User_Ref_ID] [-x ITIRC_transcation_no] [-z priority] [-T timeout] -m | print> -d destination patreq.real: Try -h for more help. patreq.real: -a Additional options. These options will be sent to the server unaltered and may be used in the future to provide additional flexibility. For example, -a 'scale=0.5' or -a 'resolution=fine'. -A Print place holder options. This option must be specified in this form : PlaceHolderName=Value. The option will be passed to the delivery agent. 'Value' will replace occurance of the string 'PlaceHolder' in the cover page PostScript file. For example, -A '%UserName%=Joe'. -b Bill-to Information. This information, which may be an address or a project number, is used to bill for usage. If the billing information is not accepted on the server, the request may be rejected. -c User Name on Fax/Printer Cover page. Specify the user name on the fax/printer cover page. The name is also used for accounting record on the print sub-system. For example, -c 'Mark Jackson' -C Subscriber fax cover template code. Use this code to specify the fax cover page to be use. If not specified, the IBM default cover page will be used. For example, -c IBM -d Destination. For fax method, this option specify a fax number. e.g. -d '927-4001' For file method, this option specify a email address. e.g. -d 'joe@mynode For print method, this option specify a destination printer; printer language can be specified with -t -f Specify the name of file for delivery. -l Page length. Possible values are 'letter' | 'legal'. The default is 'letter'. This option specify the page size of the final image. -L Direct volume access. Provide a volume label where image can be found. The image server will access the volume for image. -m Delivery Method. Possible values are 'fax' | 'rdr' | 'email' | 'stdout' | 'url'. 'fax' sends the patent as a fax image. 'rdr' sends the patent to a VM reader as an IOCA image (unless overridden by -t). 'file' sends the patent through fxsock. 'stdout' sends the patent to standard out. 'print' sends the patent to a printer. 'url' sends an url where the patent image can be found. You can specify a return port by appending a colon and the port number to the method 'url'. If no port is specified, port 80 is assumed. For example : to set return port to 7000... -m url:7000 The url method supports two image types : tif and spi (Smart Patent). The image type can be specified with -t. -n Notify. Specifies when and whom to notify. This is an address that may be prefixed with INFO: FINAL:, or ERROR:. For example, 'ERROR:mark@almaden' causes a notification to be sent only when an error occurs. 'INFO:' always sends a notification. 'FINAL:' only sends notification at the final stage or when an error is encounter. -o Owner (of the request). For example, 'kinwong@almaden'. Often, this will be a server that makes the request on behalf of a user. -p First page only. Send the first page of the requested patent(s). For example, '-p'. -P Specify a page range to be printed. The range consists of one or more number and/or sub-range delimited by commas(,). A subrange is two numbers with a '-' in between to present a range of consecutive numbers, e.g. 6-19. If the second number is not presented, it means to print to the end of the document. For example, '-P 4,6-8,10,12-20, 33- '. -r Reference ID. Used by the owner of request to match up requests with notifications. For example, -r 'PATENT2U REF 117' -s Server:Port. Specifies the server and optional port number of the patent server. For example, -s 'rhino:1999'. -t Image Type. For stdout method : The image delivery type of the requested patent(s). For print method : The printer language. This may be any valid anyimage image type. For example, -t 'tif' -T Specify a timeout value in minutes for stdout and url method. 0 <= timeout value < 61 . Default : 20. For example, -T 30 If the timeout is set to 0, you signal the image server not to return image. This is ideal for pre-caching. -u User Reference ID. -x ITIRC transaction number. -z Specify one of the following priority for the job. highest 7 higher 6 high 5 default 4 (DEFAULT) low 3 lower 2 lowest 1 e.g '-z hightest' or '-z 7' to set the job to highest priority. e.g '-z low' or '-z 3' to set the job to low priority. ============================================================================================ An example patreq call to view an image, is /ips/bin/patreq.real -s ips01i:80 -m url:80 -Lmepa2003010 EP01271234A3 which invokes the patia-fcgi FastCGI on the ips01i image server, and returns an URL, e.g. file:/dfs/.rw/cache/34/12/EP01271234A3.tif which is saying that the image server left the file at /dfs/cache/34/12/EP01271234A3.tif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Using "-m file" instead of "-m url:80", writes the same file in the same place, but does it quietly. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - By default, patreq returns a tif file. If you want to force a pdf file instead, you can specify "-t pdf", but this only works with "-m stdout" option, so you've got to call it like so /ips/bin/patreq.real -t pdf -s ips01i:80 -m stdout -Lmepa2003010 EP01271234A3 \ > EP01271234A3.mepa2003010.pdf The only way to get a PDF file from patreq, is via stdout. It would be a lot better if patreq could simply write the pdf file to /dfs/cache, but even if the document exists on CD as a PDF file, the image server code will always convert it to multi-page tif, writing it to /dfs/cache, then convert THAT back to PDF, and deliver that twice-converted PDF file. ============================================================================================