1

In our software we need to be able to convert SPL files which printer drivers write to the C:\Windows\System32\spool\PRINTERS folder to PDF files. For SPL files in PCL format we perform this conversion using pcltool.exe from VeryPDF, which mostly works fine. However we are having trouble with SPL files generated by the printer driver "Canon iR-ADV C5235/5240 PCL6". As an example, the following SPL file results from printing out a single page in notepad with the word "something" on it:

http://files.etvdzs.info/00025.spl

Converting 00025.spl using pcltool.exe results in a 70-page PDF with a row of garbage characters at the top of each page. Attempting to open 00025.spl using other PCL viewers gives similar results. We asked VeryPDF and they told us it is not a valid PCL file.

Can anybody tell me what exactly is invalid about this file? Is there any possibility of converting it to valid PCL or otherwise extracting usable data from it?

Incidentally, we had a similar problem with Postscript files generated by the "Canon iR-ADV C5235/5240 PS3" printer driver. There were binary sequences beginning with $CDCA10 and ending with $FFFF000000000000000001 at various positions in the files. After removing these sequences, we were then able to convert the files as normal. I tried a similar solution for the files generated by "Canon iR-ADV C5235/5240 PCL6", but unfortunately was not successful.

EDIT (13 Sep 2013): It seems that the binary sequences are CPCA codes. I was able to obtain documentation about CPCA by signing up for the Canon Developer Support Program at the following URL:

https://www.developersupport.canon.com/user/register

After reading this documentation, I wrote a program to remove CPCA codes from spool files. This is the result of running the program on the file 00025.spl from above:

http://files.etvdzs.info/00025.cleaned.spl

Unfortunately this still doesn't seem to be a valid PCL file :-( Can anybody tell me what exactly is wrong with this file? Is there any possibility of converting it to valid PCL or otherwise extracting usable data from it?

P.S. The program I wrote does successfully convert spool files generated by the printer drivers "Canon iR-ADV C5235/5240 PCL5c" and "Canon iR-ADV C5235/5240 PS3" to valid PCL and Postscript respectively, so I don't think it is a simple matter of the program not working.

Tim
  • 375
  • 1
  • 4
  • 18
  • Hmmm. I would think I would start by asking Canon (the company that made the spool file driver) and not the software company that (your quote) "which mostly works fine" with many other files. – Kevin Brown Aug 21 '13 at 05:23
  • Thanks for the suggestion :) I have now submitted a support request to Canon. I would still be interested in hearing from anybody who can give any insights into the file format used by this Canon driver. Incidentally, it is not *just* VeryPDF which has problems with it; every other PCL viewer/converter I have tried has similar problems. – Tim Aug 21 '13 at 07:24

1 Answers1

1

Odds are you have something like an EMF or similar file here. Ensure that the server queue (if you are printing to a network printer) is set to 'Render on client computer'. I would also look to set the Print Processor to Winprint RAW. It could also be that the Canon PCL printer isn't as generic as you'd like. You can always try a different PCL driver and see if your converter and the Canon device support the format. To confirm that the issue isn't the Windows Spooler you can set the port to FILE and/or use a capture utility to write out what the printer would actually receive post all processing. If that works but the SPL doesn't then you have a Windows Spooler and/or processor issue.

vclpdcap Capture utility

Douglas Anderson
  • 4,652
  • 10
  • 40
  • 49
  • Thanks for the answer! I found out some more about this issue after asking a question here: http://h30434.www3.hp.com/t5/Other-Printing-Questions/Can-anybody-tell-me-what-is-wrong-with-these-PCL-files/td-p/2943015 Removing the CPCA codes as I was doing it results in the file header being removed, so it is necessary to reinstate the header manually. Also, the BeginPage commands contain additional bytes, which have to be removed. After applying these corrections, one ends up with a usable PCL file in most cases, but it is not 100% reliable. – Tim Dec 22 '13 at 04:10
  • That is a good point about trying different printer drivers. All XPS converters I have tried are able to handle the output from the "Canon iR-ADV C5235 UFR II XPS" driver without any need for pre-processing such as removing CPCA codes. With the "Canon iR-ADV C5235/5240 PS3" driver, it is necessary to remove the CPCA codes, but no other pre-processing is necessary. – Tim Dec 22 '13 at 04:14
  • That's great. I've experienced what you have described with Xerox units. Instead of traditional PJL they migrated to an XML header. The good news is that is was XML so it was easy to parse; however, sometimes setting that might traditionally be in the PS/PCL are in this data and cause issues if it is simply tossed away. – Douglas Anderson Dec 24 '13 at 13:54