Issue with c1PdfViewer1 Page size width not increasing

Posted by: jaiswalshilpi43 on 7 August 2018, 6:20 am EST

  • Posted 7 August 2018, 6:20 am EST

    Can anybody please help me regarding pagesize issue. I'm using C1PdfViewer in Below code I'm using it to open PDF but page size width I'm not able to increased. I tried c1PdfViewer1.MinWidth & MaxWidth but nothing hppns. I tried using c1PdfViewer1.pageSize but i dont know how to set property for width.

    Dim c1PdfViewer1 As New C1.Silverlight.PdfViewer.C1PdfViewer
  • Marked as Answer

    Replied 8 August 2018, 4:26 am EST


    You should try setting the PageTemplate property and pass a Grid with its Width set, to the DataTemplate, something like following:
    <DataTemplate x:Key="MyPageTemplate">
    <Grid Cursor="IBeam" Width="1000">
    <Border Background="#19000000" Margin="4,4,-4,-4" CornerRadius="2" />
    <Border Background="#19000000" Margin="3,3,-3,-3" CornerRadius="2" />
    <Border Background="#19000000" Margin="2,2,-2,-2" CornerRadius="2" />
    <Border Background="#19000000" Margin="1,1,-1,-1" CornerRadius="2" />
    <Border Background="White" />
    <ContentControl Width="{Binding Width}" Height="{Binding Height}" Content="{Binding Page}" />
    <Border BorderThickness="1" BorderBrush="#FF858585" />
    <c1:C1PdfViewer x:Name="pdfViewer" PageTemplate="{StaticResource MyPageTemplate}" OpenButtonVisibility="Visible" />
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels