Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Feb 01, 2023 7:05 pm

we are using PDFViewer for a project and I am looking for someone who knows it well and can help us finish a project
small things like
rotating a PDF, deleting blank pages, getting the next, previous buttons to work
our project is written in C#
if anyone is interested, please email me at
[email protected]

colinmhart
 
Posts: 15
Joined: Thu Aug 18, 2022 7:19 pm

Thu Feb 02, 2023 5:52 am

Hi,

Thanks for your inquiry.
Please see the following code for reference.
Code: Select all
//Rotate:
this.pdfDocumentViewer1.Rotate(Spire.PdfViewer.Forms.RotateAngle.RotateAngle180);

//go to previous page:
this.pdfDocumentViewer1.GoToPreviousPage();

//go to next page:
this.pdfDocumentViewer1.GoToNextPage();

As for deleting blank pages, this function belongs to Spire.Pdf, please see the code:
Code: Select all
            PdfDocument pdf = new PdfDocument();
            pdf.LoadFromFile(inputFile);
            for (int i = 0; i < pdfDocument.getPages().getCount(); i++)
            {
                PdfPageBase pdfPageBase = pdfDocument.getPages().get(i);
                if (pdfPageBase.isBlank())
                {
                    pdfDocument.getPages().remove(pdfPageBase);
                }
            }

If the code does not meet your requirement or you have any other questions, just feel free to contact us.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.PDF