Created attachment 6496 [details] 1 big A on a page When printing attached testfiles (debugger attached with breakpoint at pcl_process): ufst-obj/pcl6 -sDEVICE=jpeg -r600 -sOutputFile=page%d.jpg lprtest.pcl lprtest.pcl C706.xl lprtest.pcl you see that the third lprtest.pcl prints no pages. It looks like the PCLselectFont() is messing with the pcs->pgs->ctm at start of second lprtest.pcl I had a breakpoint at pcl_process: pcs->pgs->ctm = { 0.59, 0.0, -0.0, -0.59, 150.0, 6299.0, ... } then the pcl_process is called from pxpcl_selectfont() with pcs->pgs->ctm = { 0.08333, 0.0, 0.0, 0.08333, 142.0, 0.0, ... } to select the font. finally when printing the last lprtest.pcl pcl_process has: pcs->pgs->ctm = { -59.05, 0.0, 0.0, -59.05, 481800.0, -2986.00 , ... } which seems to be 100 times too big, thus not printing the big 'A' from lprtest.pcl.
Created attachment 6497 [details] xl job using PCLselectFont
possible fix: add a pcl_do_resets(global_pcs, pcl_reset_initial); to the pxpcl_release().
(In reply to comment #2) > possible fix: > > add a pcl_do_resets(global_pcs, pcl_reset_initial); to the pxpcl_release(). it's not complete. It looks like the char_matrix is not reset. I'm inclined to think that the pxpcl_release should also do more with xfm_state (esp. lp2dev_mtx, pd2dev_mtx) I see in the callstack: pcl_process - pcl_text - pcl_set_graphics_state - pcl_set_ctm -> uses xfm_state.pd2dev_mtx which is still containing values from the PCLselectFont.
(In reply to comment #3) > (In reply to comment #2) > > possible fix: > > > > add a pcl_do_resets(global_pcs, pcl_reset_initial); to the pxpcl_release(). > > it's not complete. It looks like the char_matrix is not reset. > I'm inclined to think that the pxpcl_release should also do more with > xfm_state (esp. lp2dev_mtx, pd2dev_mtx) > > I see in the callstack: > pcl_process > - pcl_text > - pcl_set_graphics_state > - pcl_set_ctm -> uses xfm_state.pd2dev_mtx which is still containing values > from the PCLselectFont. Found it: the pxpcl_release() does not reset the pcs->end_page to pcl_end_page_top(). It spxpcl_release(void) { if (global_pcs) { if (gs_debug_c('i')) dprintf("passthrough: releasing global pcl state\n"); pcl_grestore(global_pcs); gs_grestore_only(global_pcs->pgs); gs_nulldevice(global_pcs->pgs); pcl_do_resets(global_pcs, pcl_reset_permanent); global_pcs->end_page = pcl_end_page_top; /* pcl_end_page handling */ pxpcl_pagestatereset(); global_pcs = NULL; /* moved after pxpcl_pagestatereset(); */ global_this_pass_contiguous = false; global_pass_first = true; global_char_shear.x = 0; global_char_shear.y = 0; global_char_scale.x = 1.0; global_char_scale.y = 1.0; global_char_bold_value = 0.0; } }till is pcl_end_page_noop(), thus not printing any pages.
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > possible fix: > > > > > > add a pcl_do_resets(global_pcs, pcl_reset_initial); to the pxpcl_release(). > > > > it's not complete. It looks like the char_matrix is not reset. > > I'm inclined to think that the pxpcl_release should also do more with > > xfm_state (esp. lp2dev_mtx, pd2dev_mtx) > > > > I see in the callstack: > > pcl_process > > - pcl_text > > - pcl_set_graphics_state > > - pcl_set_ctm -> uses xfm_state.pd2dev_mtx which is still containing values > > from the PCLselectFont. > > Found it: the pxpcl_release() does not reset the pcs->end_page to pcl_end_page_top(). It still is pcl_end_page_noop(), thus not printing any pages (pcl is still in pclxl_snippet mode!). pxpcl_release(void) { if (global_pcs) { if (gs_debug_c('i')) dprintf("passthrough: releasing global pcl state\n"); pcl_grestore(global_pcs); gs_grestore_only(global_pcs->pgs); gs_nulldevice(global_pcs->pgs); pcl_do_resets(global_pcs, pcl_reset_permanent); global_pcs->end_page = pcl_end_page_top; /* pcl_end_page handling */ pxpcl_pagestatereset(); global_pcs = NULL; /* moved after pxpcl_pagestatereset(); */ global_this_pass_contiguous = false; global_pass_first = true; global_char_shear.x = 0; global_char_shear.y = 0; global_char_scale.x = 1.0; global_char_scale.y = 1.0; global_char_bold_value = 0.0; } > }
I can't reproduce this in my version of C706 but integrated your change see the log for 11530, reopen if there are other problems.
Changing customer bugs that have been resolved more than a year ago to closed.