in reply to Re: Digital Document Capture
in thread Digital Document Capture

The PDF is created automaticaly by the scanner. I never have a chance to encode it with anything. :-(

The bar code would be printed as a seperate process. I was also thinking of just haveing one barcode per location. Then there would be just a standard cover sheet they could use to send the documents.

Update: I can get the document scanned as tiff files, one page per file. I don't know if maybe tiff is easier to scan.

___________
Eric Hodges

Replies are listed 'Best First'.
Re: Re: Re: Digital Document Capture
by dtr (Scribe) on Aug 13, 2003 at 20:21 UTC

    The first thing I would ask myself if I was in your shoes would be why I was introducing an extra PC, some code, and an extra step for the sorting room people, when they system they have at the moment probably works OK as it is.....

    Assuming that you have a good answer to this, then you may be interested to know that PDF is derived from PostScript. Postscript is a fully fledged programming language - which can be written in text format. It also supports comments :)

    To see what I mean, paste the following output into a file called "test.ps", and open it in your favourite PostScript viewer.

    %!PS-Adobe-3.0 EPSF-1.2 %%Title: (test1.ps) %%LanguageLevel: 1 %%Creator: DTR %%CreationDate: Sun Dec 8 18:25:51 2002 %%For: Console %%DocumentMedia: A4 595.27559 841.88976 0 ( ) ( ) %%Orientation: Portrait %%Pages: 1 %%BoundingBox: 0 0 595 841 %%EndComments %%BeginProlog %%BeginResource: PostScript::Simple /u {} def /STARTDIFFENC { mark } bind def /ENDDIFFENC { % /NewEnc BaseEnc STARTDIFFENC number or glyphname ... ENDDIFFENC - counttomark 2 add -1 roll 256 array copy /TempEncode exch def % pointer for sequential encodings /EncodePointer 0 def { % Get the bottom object counttomark -1 roll % Is it a mark? dup type dup /marktype eq { % End of encoding pop pop exit } { /nametype eq { % Insert the name at EncodePointer % and increment the pointer. TempEncode EncodePointer 3 -1 roll put /EncodePointer EncodePointer 1 add def } { % Set the EncodePointer to the number /EncodePointer exch def } ifelse } ifelse } loop TempEncode def } bind def % Define ISO Latin1 encoding if it doesnt exist /ISOLatin1Encoding where { % (ISOLatin1 exists!) = pop } { (ISOLatin1 does not exist, creating...) = /ISOLatin1Encoding StandardEncoding STARTDIFFENC 144 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ENDDIFFENC } ifelse % Name: Re-encode Font % Description: Creates a new font using the named encoding. /REENCODEFONT { % /Newfont NewEncoding /Oldfont findfont dup length 4 add dict begin { % forall 1 index /FID ne 2 index /UniqueID ne and 2 index /XUID ne and { def } { pop pop } ifelse } forall /Encoding exch def % defs for DPS /BitmapWidths false def /ExactSize 0 def /InBetweenSize 0 def /TransformedChar 0 def currentdict end definefont pop } bind def % Reencode the std fonts: /Courier-iso ISOLatin1Encoding /Courier REENCODEFONT /Courier-Bold-iso ISOLatin1Encoding /Courier-Bold REENCODEFONT /Courier-BoldOblique-iso ISOLatin1Encoding /Courier-BoldOblique REENCO +DEFONT /Courier-Oblique-iso ISOLatin1Encoding /Courier-Oblique REENCODEFONT /Helvetica-iso ISOLatin1Encoding /Helvetica REENCODEFONT /Helvetica-Bold-iso ISOLatin1Encoding /Helvetica-Bold REENCODEFONT /Helvetica-BoldOblique-iso ISOLatin1Encoding /Helvetica-BoldOblique RE +ENCODEFONT /Helvetica-Oblique-iso ISOLatin1Encoding /Helvetica-Oblique REENCODEFO +NT /Times-Roman-iso ISOLatin1Encoding /Times-Roman REENCODEFONT /Times-Bold-iso ISOLatin1Encoding /Times-Bold REENCODEFONT /Times-BoldItalic-iso ISOLatin1Encoding /Times-BoldItalic REENCODEFONT /Times-Italic-iso ISOLatin1Encoding /Times-Italic REENCODEFONT /Symbol-iso ISOLatin1Encoding /Symbol REENCODEFONT /box { newpath 3 copy pop exch 4 copy pop pop 8 copy pop pop pop pop exch pop exch 3 copy pop pop exch moveto lineto lineto lineto pop pop pop pop closepath } bind def /circle {newpath 0 360 arc closepath} bind def %%EndResource %%EndProlog % TRY CHANGING SOME OF THESE VALUES TO GET A FEEL % FOR WHAT HAPPENS 0.6 0 0 setrgbcolor %red /Arial findfont 20 scalefont setfont newpath 1 u 450 u moveto (Hello world!) show stroke newpath 1 u 200 u moveto (This \(stuff\) was generated entirely from Perl) show stroke 0 0.8 0 setrgbcolor 50 u 50 u 150 u 150 u box stroke 1 1 0.2 setrgbcolor 100 u 100 u 50 u circle fill 0 0 0.8 setrgbcolor newpath 100 u 100 u moveto (This is a test) dup stringwidth pop 2 div neg 0 rmoveto show % A simple arc newpath 300 300 50 0 90 arc closepath stroke % A arc between 2 lines % giving the appearance of a rounded corner newpath 400 400 moveto 400 410 lineto 400 420 410 420 10 arct 420 420 lineto stroke % An example of a box in a dropout colour newpath 500 500 moveto 0 20 rlineto 20 0 rlineto 0 -20 rlineto closepath 1 1 1 setrgbcolor fill /Arial findfont 20 scalefont setfont 510 500 moveto 0.6 0.6 0.4 setrgbcolor 0 0.8 0 setrgbcolor 0 u 180 u 20 u 160 u box stroke 22 u 180 u 42 u 160 u box stroke 44 u 180 u 64 u 160 u box stroke /Arial findfont 18 scalefont setfont 0 0 0.8 setrgbcolor newpath 10 u 163 u moveto (B) dup stringwidth pop 2 div neg 0 rmoveto show newpath 32 u 163 u moveto (O) dup stringwidth pop 2 div neg 0 rmoveto show newpath 54 u 163 u moveto (X) dup stringwidth pop 2 div neg 0 rmoveto show /Arial findfont 12 scalefont setfont 0.8 0 0 setrgbcolor newpath 10 u 350 u moveto (My address is:) show stroke newpath 10 u 330 u moveto (HELLO) show stroke %%EOF

    NOTE - where some of the "REENCODEFONT" words have been wrapped above with a "+" sign, you need to remove the "+" sign and put them onto one line for this to work

    Credit is due to the PostScript::Simple module on CPAN for getting me started with this. Also - disclaimer - I know just enough PostScript to draw the circles, boxes, and text I drew on that page - no more.

    Anyway, that should be enough to get you started :). You should be able to insert a few harmless comments of your own at the top of a PostScript file (you may also be able to do it with PDF), and use these to keep track of where the document should go.