NAME

Scanner::Job - Handle a scanning job, where job is usually a document.

SYNOPSIS

use Scanner::Job;
$obj = Scanner::Job->new($scanner,$firstpage,$format,$spine_width_inches,$total_sheets,$path,$date,$publication);

$obj = $obj->scan;
$obj = $obj->nextPageNumbers;
$str = $obj->pageid;
$str = $obj->guessPageTitle;
$num = $obj->setPagesPerSheet ($pgs);
$num = $obj->setPagesPerSheetAsIn ($line);
$num = $obj->setBatchLength ($num);
$flg = $obj->isSpine;
$str = $obj->setPageTitle;
$num = $obj->initBatchCnt;
$num = $obj->decBatchCnt;
$str = $obj->pageTitle;
$num = $obj->totalSheets;
$num = $obj->batchLength;
$num = $obj->pagesPerSheet;

Inheritance

UNIVERSAL

Description

Handle a scanning job, where job is usually a document.

Examples

None.

Class Variables

None.

Instance Variables

  FirstPage          String identifying the number portion of the first 
                     page scanned. eg "000"
  FirstPageId        String identifying the the first page scanned, including
                     subpage numbers and such. eg "000a"
  FormatPage         Scanner::Format object for pages
  SpineFormat        Scanner::Format object for spine.
  scanner            Scanner object.
  Total_Sheets       Total sheets in document. Not really used yet.
  pgspersheet        Pages per scanned sheet. Usually 1 or 2.
  batchlen	     Number of pages in ADF scan batch.
  batchcnt	     Page count of ADF scan batch.
  PageTitle          Type of page. cover, backcover, contents...
  curpgobj1	     Document::PageIterator for the page, or of the left
		     hand page if there are two.
  curpgobj2	     Document::PageIterator for the page, or of the right
		     hand page if there are two.

Class Methods

$obj = Scanner::Job->new ($scanner,$firstpage,$format,$spine_width_inches,$total_sheets,$path,$date,$publication)

Create and initialize instances of Scanner::Job.

scanner              A Scanner object.
firstpage            Page number to begin scanning at.
format               A page format string, ie "L:10x12"
spine_width_inches   Width of the document spine.
total_sheets         Total sheets in the document. Not really used yet.
path                 Where to put the document.
date                 Date of the document.
publication          Name of the publication, title and author of book or
                     paper, etc.

Instance Methods

$obj = $obj->scan

Set up the information for the next page of the document and scan it. The page will be named, placed in its document directory and logged and added to the table of contents file there.

If the page name is the special token 'spine', then the special pageid of "000.spine" is used instead of the current pageid and the document scan format is set for the width of the spine in whichever dimension on the scanbed is appropriate: scanner height if landscape; scanner width if portrait.

Returns self.

$num = $obj->nextPageNumbers

Increment the page number or numbers.

Returns self.

$str = $obj->pageid

Return a pageid string made up from info from one or two pageid objects. Returns <pageid1> or <pageid1>-<pageid2>

$str = $obj->guessPageTitle

Make our best guess at what the user is going to want for the title. Returns PageTitle.

$num = $obj->setPagesPerSheet ($pgs)

Set the number of pages per sheet and return the value when done.

$num = $obj->setPagesPerSheetAsIn ($line)

Set the pages per sheet to match $line and return the result of doing so.

$num = $obj->setBatchLength ($n)

Set the batch length and return the result of doing so.

$flg = $obj->isSpine

Return true if the page is the document spine, ie the page number is 000.spine.

$str = $obj->setPageTitle

Set the page title and return the result of doing so.

$num = $obj->initBatchCnt

Set the batch count to the batch length and return the result.

$num = $obj->decBatchCnt

Decrement the batch count until it reaches 0. Returns the value after the decrement.

$str = $obj->pageTitle

Returns the page title.

$num = $obj->totalSheets

Returns the total sheets.

$num = $obj->batchLength

Returns the batch length.

$num = $obj->pagesPerSheet

Returns the pages per sheet.

Private Class Method

None.

Private Instance Methods

None.

Errors and Warnings

None.

KNOWN BUGS

See TODO.

SEE ALSO

Document::LogFile, Document::TocFile, Document::Toc, Document::PageIterator, Scanner, Scanner::Page

AUTHOR

Dale Amon <amon@vnl.com>

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 332:

You forgot a '=back' before '=head1'

Around line 411:

=back doesn't take any parameters, but you said =back 4