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

Tue Mar 21, 2017 11:43 pm

I am creating a demo, using the trial version (have to be able to demo before buying a license), and having issues setting the width and height on a Asp Net Webforms page. I have tried to set the pdfdocumentviewer1.Attributes.Add("width", "100%") but that is ignored. I tried the direct width property, but that does not allow for auto (for height) or percentages (for width).

It is also necessary for the demo to be able to print and from your tutorials I am unable to get this to work without having errors. Especially when pdfdocumentviewer1 does not have a print option as shown in the tutorials.

Can you please help me to complete this demo. Thank You.

bsmith123
 
Posts: 1
Joined: Fri Feb 17, 2017 9:50 pm

Wed Mar 22, 2017 9:50 am

Dear bsmith123,

Thanks for your inquiry.
Sorry that currently Spire.PDFViewer for ASP.NET doesn't support to print, the function is supported in WinForm and WPF.
And now there is a only way to change the Width/Height of control, change the values as below in source code.
Code: Select all
    <form id="form1" runat="server">
        <cc1:PdfDocumentViewer ID="PdfDocumentViewer1" runat="server" Width ="500px" Height="900px">
        </cc1:PdfDocumentViewer>
    </form>

If there is any question, please let me know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDFViewer