Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Tue Jun 13, 2017 12:15 pm

Good morning.
I'm evaluating the purchase of this library for an application I'm developing for production management.

I need a PDF viewer, this is great, but I still have to handle code by hiding the toolbar.

How to hide the toolbar I found it, but I can not, after uploading the file, make a suitable window.

Is there a list of commands that you can use?

THANK YOU.

PippoIppo
 
Posts: 4
Joined: Mon Jun 12, 2017 2:22 pm

Wed Jun 14, 2017 2:20 am

Hello,

Thanks for your inquiry.
Concerning your case, please use the following code to set the viewer window size according to the related document page size.
Code: Select all
this.pdfDocumentViewer1.Width =your document page width;
            this.pdfDocumentViewer1.Height = your document page height;

If there's still any doubt, please feel free to contact us.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Mon Jun 19, 2017 6:49 am

Hello,

Has your issue been resolved?
Could you please give us some feedback at your convenience?

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Mon Jun 19, 2017 8:54 am

Hello.
Meanwhile, thank you for having responded to me and sorry for the delay in answering you in turn.

Unfortunately I can not apply the code you passed to me. For simplicity you put the test code that you use (VB.NET 2015):
Code: Select all
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
            Dim pdfDoc As String = "C:\PdfFile.pdf"
            If File.Exists(pdfDoc) Then
                pdfViewer1.LoadFromFile(pdfDoc)
                pdfViewer1.IsToolBarVisible = False
                pdfViewer1.ResumeLayout()
            End If
        End Sub


So I can load the .pdf file, but it does not fit the document to the window.

Then while there are, once you upload the file, can you code, zoom and move? I do not want to use your toolbar because I should use the viewer in a managed application from a touch screen monitor, so I designed the most suitable buttons for the operator.

Thanks.

PippoIppo
 
Posts: 4
Joined: Mon Jun 12, 2017 2:22 pm

Tue Jun 20, 2017 7:24 am

Hello,

Sorry for the late reply.
Concerning your needs, you should use the pdfDocumentViewer rather than the pdfviewer. In pdfviewer, the functions have been packaged and users can only handle the document by the operation in the graphical interface, while for the pdfDocumentViewer, one can have the the custom designs.
Below are the answers to your questions:
##1.Fit the the window
Code: Select all
Me.pdfDocumentViewer1.ZoomTo(ZoomMode.FitPage)

##2.Zoom
Code: Select all
Me.pdfDocumentViewer1.ZoomTo("percentage you want")

##3.Move (I assume you want to move to a certain page, if not, please provide more details)
Code: Select all
Me.pdfDocumentViewer1.GoToPage("targetPage")

As for the "code" you mentioned, sorry I'm a little confused, please specify it.
Besides, you can download the Spire.PDFViewer Pack Version:2.12 and refer to the detailed demos in the package, and I believe this may help a lot.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Thu Jun 22, 2017 9:31 am

Hello PippoIppo,

How is your issue now? Could you please give us some feedback at your convenience?

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.PDFViewer