From: Gernot H. <aik...@gm...> - 2017-04-16 01:22:25
|
On Sat, Apr 15, 2017 at 9:43 PM, Gernot Hassenpflug <aik...@gm...> wrote: > On Sat, Apr 15, 2017 at 8:53 PM, Ludwig TAUER <ta...@ao...> wrote: >> On Samstag, 15. April 2017 05:06:58 CEST Gernot Hassenpflug wrote: >>> On Sat, Apr 15, 2017 at 1:37 AM, Ludwig TAUER <ta...@ao...> wrote: > > Hallo Ludwig, Gruess Gott, > >>> > 6.) Printing to CD tray is off by approximately -27 mm. >>> >>> Yes, for this we need someone to test. Currently changes require >>> recompiling the driver, >> >> No problem. I am on the programming trail since 45 years. ;-) > > Wunderbar! Hello Ludwig, I left out one critical function in the previous email. >>> so it would be better to talk offline and let >>> me send you test printjobs with corrected offsets. You don't say where >>> this correction is needed, but if it is only one axis that would be >>> fairly simply I assume. >> >> Only vertically misaligned as far as I can see. The printout is >> shifted to the bottom approximately 27 mm. > > Excellent. > >> Tell me where to change something and I can start trial and error >> cycles for my own to speed things up. > > All right, here is the overview: > > (1) CD trays fall into several types, with alphabetic names, from A to > L (currently). > > (2) iP7200 uses the type J, any corrections will be useful to all > other printer models using this tray type. > > (3) code is in print-canon.c, specifically functions: > canon_size_type (setting of tray type codes, no changes needed) > canon_init_setPageMargins2 (settings of page size and offsets, here is > the place to experiment) > canon_set_ESC_P (setting of tray type codes, no changes needed) canon_setup_channels (where CANON_CD_X, CANON_CD_Y are defined and used, adjustments needed here) > (4) for the adjustments in canon_init_setPageMargins2 > > These adjustments are per tray type. Adjustments are done in point > dimensions in the code (1/72 inches), and later converted to printer > units (1/600 inches) for final output. > (See the comments in the code for the full version) > > There are two fixed parameters currently in the code, which should not > be changed: > CANON_CD_X, CANON_CD_Y > These should in fact be parameters specific to each tray type, but > since I don't know the history of the code, it is hard to correct this > at present until confirmation of all the variations for different tray > types has been done. > > So, we do adjustments on these fixed parameters, per tray type. > printable_width adjusted via adjust_tray_J_width > printable_length adjusted via adjust_tray_J_length > > We adjust later also the following similarly: > page_width > page_height > Fortunately, the iP7200 has already been chosen as a test subject > (from a previous attempt to work with a tester), so the code already > is active. > > Then there are border adjustments, again already the iP7200 is chosen: > border_left2 > border_right2 > border_bottom > border_top > I doubt that anything needs to be changed here at the moment, all > adjustments are set to 0 currently in the code. > > I guess that either or printable_length and or page_height need to be > set differently. 27mm is quite a large shift, it is not clear whether > that is owing to the paper dimensions, or to the image dimensions. > Maybe reduce one or the other independently first. (5) adjustment in canon_setup_channels, requires adjustment also in (4) abvove. if (print_cd) { privdata->cd_inner_radius = hub_size / 2; privdata->cd_outer_radius = stp_get_width(v) / 2; privdata->left = CANON_CD_X - privdata->cd_outer_radius + stp_get_dimension_parameter(v, "CDXAdjustment");; privdata->top = CANON_CD_Y - privdata->cd_outer_radius + stp_get_dimension_parameter(v, "CDYAdjustment"); privdata->page_width = privdata->left + privdata->out_width; privdata->page_height = privdata->top + privdata->out_height; As you can see, the top is set according to CANON_CD_Y, so even if the adjustments in (4) are correct for the overall page dimensions, the shift you see might well be owing to CANON_CD_Y (in fact, very likely). Unfortunately, without an actual testprinter, getting this right is not so easy. I had written code to handle this in a coordinated manner, but again, until we know the individual preferences for each tray type, we cannot guarantee that the existing behaviour is either kept or changed for the better. It would thus help greatly if your experimentation results in a working CD printing configuration for the Tray J printers. Many thanks, Gernot >> With greetings from Vienna, Austria >> Ludwig Tauer > > Best wishes, > Gernot Hassenpflug |