diff -up ghostscript-8.71/base/gdevtfnx.c.tiff-fixes ghostscript-8.71/base/gdevtfnx.c --- ghostscript-8.71/base/gdevtfnx.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000 +++ ghostscript-8.71/base/gdevtfnx.c 2010-03-16 10:04:00.686600827 +0000 @@ -105,6 +105,8 @@ tiff12_print_page(gx_device_printer * pd TIFFSetField(tfdev->tif, TIFFTAG_BITSPERSAMPLE, 4); tiff_set_rgb_fields(tfdev); + TIFFCheckpointDirectory(tfdev->tif); + /* Write the page data. */ { int y; diff -up ghostscript-8.71/base/gdevtifs.c.tiff-fixes ghostscript-8.71/base/gdevtifs.c --- ghostscript-8.71/base/gdevtifs.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000 +++ ghostscript-8.71/base/gdevtifs.c 2010-03-16 10:04:00.689600292 +0000 @@ -243,8 +243,8 @@ int tiff_set_fields_for_printer(gx_devic TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); - TIFFSetField(tif, TIFFTAG_XRESOLUTION, pdev->x_pixels_per_inch); - TIFFSetField(tif, TIFFTAG_YRESOLUTION, pdev->y_pixels_per_inch); + TIFFSetField(tif, TIFFTAG_XRESOLUTION, (float)pdev->x_pixels_per_inch); + TIFFSetField(tif, TIFFTAG_YRESOLUTION, (float)pdev->y_pixels_per_inch); { char revs[10]; @@ -293,6 +293,8 @@ tiff_print_page(gx_device_printer *dev, if (data == NULL) return_error(gs_error_VMerror); + TIFFCheckpointDirectory(tif); + memset(data, 0, max_size); for (row = 0; row < dev->height; row++) { code = gdev_prn_copy_scan_lines(dev, row, data, size); diff -up ghostscript-8.71/base/gdevtsep.c.tiff-fixes ghostscript-8.71/base/gdevtsep.c --- ghostscript-8.71/base/gdevtsep.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000 +++ ghostscript-8.71/base/gdevtsep.c 2010-03-16 10:04:00.700601143 +0000 @@ -1438,6 +1438,10 @@ tiffsep_print_page(gx_device_printer * p return_error(gs_error_VMerror); } + for (comp_num = 0; comp_num < num_comp; comp_num++ ) + TIFFCheckpointDirectory(tfdev->tiff[comp_num]); + TIFFCheckpointDirectory(tfdev->tiff_comp); + /* Write the page data. */ for (y = 0; y < pdev->height; ++y) { code = gdev_prn_get_bits(pdev, y, line, &row); @@ -1603,6 +1607,9 @@ tiffsep1_print_page(gx_device_printer * if (line == NULL || unpacked == NULL || dithered_line == NULL) return_error(gs_error_VMerror); + for (comp_num = 0; comp_num < num_comp; comp_num++ ) + TIFFCheckpointDirectory(tfdev->tiff[comp_num]); + /* Loop for the lines */ for (y = 0; y < pdev->height; ++y) { code = gdev_prn_get_bits(pdev, y, line, &row);