Using the transform_update utility

Use the transform_update utility to update InfoPrint Manager about the job page count or number of pages completed.

You can use the %u transform option to access an update file that lets you update the document page count or the job'spages-completed attribute. Never access the file identified with %u directly. The transform should only use the transform_update utility. InfoPrint Manager only checks for updates while the transform is running and immediately after it completes. The transform_update utility can be called either once or multiple times while the transform is running. Once the transform returns, InfoPrint Manager deletes the update file.

The transform_update utility provides these return codes:

1
An English message for basic problems, including:
Invalid option specified.
No option or option value specified.
No status file name specified.
Cannot open status file named ____.
Cannot read status file named ____.
0
A successful update
-1
The update of the status file was not successful.
transform_update [-t delta_pages_transformed]
                    [-d delta_pages_delivered]
                    update_file
-t
Specifies the number of additional pages since the last update in the transformed document file. InfoPrint Manager uses this information to recalculate the job's job-page-count attribute. The total of values that this option passes cannot exceed 2,147,483,647.
-d
Specifies the number of additional pages delivered by the transform since the last update. InfoPrint Manager uses this information to update the job's pages-completed attribute. The total of values that this option passes cannot exceed 2,147,483,647.

Often, it is unnecessary for transforms to update the pages-completed attribute because it indicates how many pages have actually printed or stacked for the job, and this attribute is updated by the print backend in InfoPrint Manager with the number of pages that were printed. Any pages referenced here should have been removed from any file returned to InfoPrint Manager for further processing.

update_file
The file passed to the transform through the %u option.
    Note:
  1. If a transform calls the transform_update utility more than once, each call should pass a value for the change since the last call, not a cumulative value.
  2. If InfoPrint Manager can neither open nor read the file, it logs an error and continues processing.
  3. If you use a transform to update the job-page-count attribute, you must provide a page-count for the document. This page-count information provided by the transform should be the pages in the transformed document for a single copy of that document.
  4. If a transform updates the pages-completed attribute and returns a job for printing, the pages the actual destination completes are added to the pages the transform reported it had completed.