INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Get number of pages from specific spl files PCL5

Get number of pages from specific spl files PCL5

Get number of pages from specific spl files PCL5

(OP)
Hi! Now I'm working on tool which will provide me number of pages and copies from windows spool files. I'm trying to understand how to do that with known tools like pkpgcounter and pclparaphernalia - it's really not so easy. So I'm using pkpgcounter tool to check how many pages has the printjob and pclparaphernalia to get all needed sequences. Now I faced with a problem with simple pcl5 drivers from Konica Minolta and HP. I downloaded this drivers from official web site, there was info that this are PCL5 Universal Print Drivers. So I stuck with it. Here is attached spool files that was generated with those drivers.

00015.SPL - KONICA MINOLTA Universal Print Driver Ver.2 Maintenance Release 8 (PCL/Version 2.80.0.0, PCL5/Version 2.80.0.0)

00014.SPL - upd-pcl5-x64-5.9.0.18326 - Name of HP driver

I found sequence that matches number of pages and copies in spool file generated with Canon PCL5 UP, and its - <Esc>*p723x - Cursor Position Horizotal. Not sure if it's correct. But for other PCL5 drivers it doesn't works.
Who knows how to get number of pages and copies From PCL5 spool files? What tags? pclparaphernalia - give error when I'm trying to decompile these attached files. Pkpgcounter gives me - "unsupported file format"

Any Ideas?

For the moment I already can count pages and copies from PCLXL (aka PCL6) spool files. By counting EndPage Tags.

Thank You in advance !

SPL Files:
http://files.engineering.com/getfile.aspx?folder=5...
http://files.engineering.com/getfile.aspx?folder=f...

RE: Get number of pages from specific spl files PCL5

Your spool files do not contain raw PCL data, so it is not surprising that the PRN File Analyse tool in PCL Paraphernalia reports errors.

I don't know what the format of the data in these files is (perhaps EMF ?).
.spl files can contain raw printer-ready data (in whatever Page Description Language (e.g. PCL5, PCL XL, PostScript, JetReady, Esc/P, etc.) is in use), but will (I think) contain EMF (an intermediate encoding used within the Windows spooler) if certain options are set in the driver.


... and as for your statement "... I found sequence that matches number of pages and copies in spool file generated with Canon PCL5 UP, and its - <Esc>*p723x - Cursor Position Horizotal. Not sure if it's correct ...": the "Cursor Position Horizontal" escape sequence is just that - positioning the cursor horizontally - and has absolutely nothing to do with delineating pages.

As you have found, obtaining page counts from PCL XL print streams is fairly straightforward - just look for all of the EndPage operators.

But obtaining page counts from PCL5 print streams is not so easy, since there are numerous 'new page' triggers: the simplest is a FormFeed control-code character, but new pages can also be triggered in a number of other ways (e.g. by changes of page size, page orientation, vertical cursor overflowing text area, etc.).

RE: Get number of pages from specific spl files PCL5

Thanks Jim

I trust that you are keeping well?

RE: Get number of pages from specific spl files PCL5

(OP)
Thank You DansDadUK!

Yes, there is no problems with PCL6, and I am glad that the structure of this document is clear.
Otherwise what to do with the PCL5 drivers, yes this tag <Esc>*p723x was suitable only for canon devices. and "has absolutely nothing to do with delineating pages."

Is it possible to get data about printjob from EMF file? Or is better to set driver properly..

Thanks!

RE: Get number of pages from specific spl files PCL5

>> ... tag <Esc>*p723x was suitable only for canon devices ...

This 'tag' (more accurately, a PCL parameterised escape sequence) is supported, and in common use, on all PCL5 printers, not just those manufactured by Canon.


>> ... Is it possible to get data about printjob from EMF file? ...

The CodeProject web site offers an EMF spool file viewer; you'd need to register with the site, and login, in order to download the code.

I've no idea how useful this would be.

RE: Get number of pages from specific spl files PCL5

... and I suspect that what influences whether the spool file contains Enhanced Meta File data, or raw Page Description Language data, is choosing (when setting up the printer driver instance) whether to 'spool' the data, or print 'directly' to the printer.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close