Bug 691146

Summary: vendor unique operater causes the PXL assembler to fail
Product: GhostPCL Reporter: Henry Stiles <henry.stiles>
Component: PCL interpreterAssignee: Hin-Tak Leung <htl10>
Status: RESOLVED FIXED    
Severity: normal Keywords: bountiable
Priority: P4    
Version: unspecified   
Hardware: Macintosh   
OS: MacOS X   
Customer: Word Size: ---
Attachments: a script I wrote for comparing round-trip disassemble/assemble

Description Henry Stiles 2010-02-26 07:40:30 UTC
None of the new Quality Logic Application Test Suite files can be disassembled
and re-assembled because a vendor unique flag in SetAdaptiveHalftoning is not
recognized.  All the files can be parsed with the artifex xl interpreter which
ignores the operator and operands.
Comment 1 Henry Stiles 2010-02-26 07:43:09 UTC
Created attachment 5992 [details]
VZTTEUJ3.BIN
Comment 2 Hin-Tak Leung 2010-02-26 07:59:40 UTC
Hmm, I guess I could/should tackle this if nobody at Artifex is doing it any
time soon? 
Comment 3 Hin-Tak Leung 2010-03-05 03:03:29 UTC
The message referring to 'SetAdaptiveHalftoning' is bogus which is fixed by 
(r10851 - abort instead of writing wrong text dump) . Round-trip disassemble/assemble should work with r10854.

the relevant changes are r10851 to r10854 .
Comment 4 Hin-Tak Leung 2010-03-05 03:22:21 UTC
Created attachment 6033 [details]
a script I wrote for comparing round-trip disassemble/assemble

The bug is due to disassemble being silently wrong and then assembling slight garbage gives wrong result which differs from the original. So the fix consists of a few parts: (1) if it cannot be disassembled, then it should abort with relevant message, (r10851) (2) adding the relevant info for the stream to be disassemble correctly (r10852), (3) assemble should indicates garbaged input as garbage and also provide informative message (r10853,r10854).

- the final result should preserve round-trip disassemble/asseumbe.

a very ugly perl script I wrote for comparing round-trip disassemble/assemble. It is very unix-centric and depends on a few command-line utilities like md5sum, dd and tail. 

The ATS test file has fairly extended PJL header and also some PJL footer which aren't preserved during round-trip ssemble/assemble . So this script tries to find the offset into the PXL stream and also the end of it and just calculate the md5sum of the important significant portion in the middle without the PJL header and footer; the md5sum should be the same after round-trip.