Page 1 of 1

Deleting Pages of Tif Not Reflected in DocuVieware

Posted: Mon Oct 14, 2019 9:51 pm
by OleBroseph
Hi,

When trying to delete pages of a tif file, it seems that the actual tif file is not modified behind the scenes. We redraw the pages after editing the tif, but when we save the document, the document still has the pages we deleted. See below code example of what we are doing:

Code: Select all

//Deleting 3 page tif example
var status = docuVieware.GetNativeImage(out var imageId);

if (status == GdPictureStatus.OK && imageId != 0)
{
	using (var image = new GdPictureImaging())
        {
        	var imageFormat = image.GetImageFormat(imageId);

                if (imageFormat != GdPicture14.DocumentFormat.DocumentFormatTIFF)
                {
                	status = GdPictureStatus.UnsupportedImageFormat;

                        return status;
                }
			
		//Delete pages 2 and 3
                foreach (var page in pagesToDelete)
                {
                	status = image.TiffDeletePage(imageId, page);

                       	if (status != GdPictureStatus.OK)
                        {
                        	return status;
                        }
             	}

		//Redraw page 1
                docuVieware.RedrawPages(new List<int> {1}.ToArray());
	}
}
The above code will show that DocuVieware contains a one page tif, but when downloading the document, it's still a three page tif.

Re: Deleting Pages of Tif Not Reflected in DocuVieware

Posted: Sat Oct 19, 2019 4:29 pm
by Loïc
Hello,

Our staff replied to your ticket on the Helpdesk by explaining that the RedrawPages() method must be ued for such purpose.
Reference: https://www.docuvieware.com/guides/aspn ... Pages.html

Re: Deleting Pages of Tif Not Reflected in DocuVieware

Posted: Tue Nov 05, 2019 10:21 pm
by OleBroseph
I just created an account on the support site. How can I access the reply from there?

Re: Deleting Pages of Tif Not Reflected in DocuVieware

Posted: Wed Nov 06, 2019 11:29 am
by loicaigon
Hi OleBroseph,

The reply Loic C. mentions is an internal support ticket of ours and you won't have access to it publicly. However, if you tell us here or through our support which problem do you have, we can make things clearer here ;)

Loic A.