tiffscaled32_print_page(gx_device_printer * pdev, gp_file * file)
{
    gx_device_tiff *const tfdev = (gx_device_tiff *)pdev;
    int code;

    code = gdev_tiff_begin_page(tfdev, file);
    if (code < 0)
        return code;

    if (tfdev->icclink != NULL && tfdev->icclink->num_output != 4)
    {
        code = tiff_set_icc_color_fields(pdev);
        if (code < 0)
            return code;
    } else {
        tiff_set_cmyk_fields(pdev, tfdev->tif, 8, tfdev->Compression,
            tfdev->MaxStripSize);
    }

    return tiff_downscale_and_print_page(pdev, tfdev->tif,
                                         tfdev->downscale.downscale_factor,
                                         tfdev->downscale.min_feature_size,
                                         tfdev->AdjustWidth,
                                         8, 4,
                                         tfdev->downscale.trap_w, tfdev->downscale.trap_h,
                                         tfdev->downscale.trap_order,
                                         0);
}
tiffscaled32_print_page(gx_device_printer * pdev, gp_file * file)
{
    gx_device_tiff *const tfdev = (gx_device_tiff *)pdev;
    int code;

    code = gdev_tiff_begin_page(tfdev, file);
    if (code < 0)
        return code;

    if (tfdev->icclink != NULL && tfdev->icclink->num_output != 4)
    {
        code = tiff_set_icc_color_fields(pdev);
        if (code < 0)
            return code;
    } else {
        tiff_set_cmyk_fields(pdev, tfdev->tif, 8, tfdev->Compression,
            tfdev->MaxStripSize);
    }

    return tiff_downscale_and_print_page(pdev, tfdev->tif,
                                         tfdev->downscale.downscale_factor,
                                         tfdev->downscale.min_feature_size,
                                         tfdev->AdjustWidth,
                                         8, 4,
                                         tfdev->downscale.trap_w, tfdev->downscale.trap_h,
                                         tfdev->downscale.trap_order,
                                         0);
}