Dynamically hide a page?

Dynamically hide a page?

Forum member · May 15, 2006
Is there anyway for me to dynamically hide a page or pages in a pdf document on the fly from VB.net?

Re: Dynamically hide a page?

Support · May 15, 2006
Hello, I am not sure what you meant by hide a page or pages. There is no way you can hide any pages from an existing PDF document. However, you can reassemble the PDF by removing or adding desired pages from an existing PDF document or multiple PDF documents using our product. There is an overloaded MergeDocument constructor that takes the starting page number and the number of pages you want to merge. Please refer to the SelectPages example downloaded with the evaluation version download. Thanks, ceTe Software Support Team

Re: Dynamically hide a page?

Forum member · May 16, 2006
Hello, I see in the example that there is a way to append a page to a document. Is there a method or removing or deleting a page from a document on the fly? Thanks, Matt

Re: Dynamically hide a page?

Support · May 16, 2006
Hello Matt, There is no direct way to delete or remove a page from the PDF document but you can use the overloaded Append method which takes the starting page number and the number of pages to append. For example; if you have a 5 page PDF document and you want to remove the third page, below will be the sample code snippet: Dim MyPdfDocument As PdfDocument = New PdfDocument(filepath) ' Merge pages 1 and 2 Dim Mydocument As MergeDocument = New MergeDocument(MyPdfDocument, 1, 2) ' Append pages 4 and 5 MyDocument.Append(MyPdfDocument, 4, 2) ' Draw the output pdf with pages 1, 2, 4 and 5 MyDocument.DrawToWeb() Thanks, ceTe Software Support Team