GetContents

GetContents

Forum member · Oct 18, 2006
Does the PdfPage.GetContents() method no longer work? It seems to be returning the same 41 bytes for each page regardless of its content. I'm looking for a way to be able to programatically remove blank pages from a document, where we determine that a blank page is any page that has a content stream of less than a given number of bytes. Is this at all possible?

Re: GetContents

Forum member · Oct 18, 2006
Looking at this further, it appears that it may only affect linearized documents. Is there any way around this?

Re: GetContents

Support · Oct 18, 2006
Hello, It is not possible to find out if the page is blank or not using our product and using the GetContents() method is not recommended as results will not be consistent because there is a possibility that the page may contain some invisible data or elements on it resulting it different values being returned. Also the number of bytes returned for the blank PDF document page created by different PDF creators varies in size depending on the way the PDF page is structured. Can you please let us know if the GetContents() method returns correct number of bytes when the PDF document is Linearized or not? Does it return correct number of bytes when working with non-linearized PDF documents? Thanks, ceTe Software Support Team