Deleting Pages of Tif Not Reflected in DocuVieware

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
OleBroseph
Posts: 11
Joined: Thu Jun 06, 2019 11:07 pm

Deleting Pages of Tif Not Reflected in DocuVieware

Post by OleBroseph » Mon Oct 14, 2019 9:51 pm

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.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Deleting Pages of Tif Not Reflected in DocuVieware

Post by Loïc » Sat Oct 19, 2019 4:29 pm

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

OleBroseph
Posts: 11
Joined: Thu Jun 06, 2019 11:07 pm

Re: Deleting Pages of Tif Not Reflected in DocuVieware

Post by OleBroseph » Tue Nov 05, 2019 10:21 pm

I just created an account on the support site. How can I access the reply from there?

loicaigon
Posts: 35
Joined: Mon Oct 21, 2019 9:11 am

Re: Deleting Pages of Tif Not Reflected in DocuVieware

Post by loicaigon » Wed Nov 06, 2019 11:29 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest