We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PdfViewer is not Rendering files as it Should

Thread ID:

Created:

Updated:

Platform:

Replies:

146049 Jul 17,2019 07:04 PM UTC Jul 19,2019 11:32 AM UTC WPF 3
loading
Tags: PdfViewer
luis alkaid de la rosa garza
Asked On July 17, 2019 07:04 PM UTC

Hello! i wanted to do a PDF Reader with a Radial Menu to navigate the file..
everything seems all right. but when i use the method .Load from my mainwindow.xml.cs

every pdf file renders like this. (The little dot is the Visual)



It seems to render the text in the correct size. but not the visuals.




Started with : 16.2460.0.41 then Updated to
Version : 17.2460.0.35 (NUGET)
Framework : 5.6.1

This is the code of my  Control XAML 

<pdfViewer:PdfViewerControl x:Name="Pdf" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" UseLayoutRounding="True" />

Im drawing the Radial Menu like the Syncfusion Example 
using to get the mouse in MouseDown and Up Events

rect = e.GetPosition(this.Pdf);

Please guide me.. attached is my XML and images with an example file but it happens to every file i open 

Attachment: Sync_c194b018.7z

Aravindh Sathiyamoorthy [Syncfusion]
Replied On July 18, 2019 05:36 PM UTC

Hi luis 
Greetings from Syncfusion.  
We have created a simple sample to reproduce the reported issue “PDF document is not loaded properly” in our side, but the behavior is working as expected. Please find the sample in the below link for your reference.  
Kindly share the following details to analyze more on this issue and assist you with the better solution   
1.       Simple sample/ modify the above sample to reproduce the issue.  
2.       Replication procedure to reproduce the issue.    
Regards,  
Aravindh Sathiyamoorthy. 


luis alkaid de la rosa garza
Replied On July 18, 2019 07:12 PM UTC

Hi luis 
Greetings from Syncfusion.  
We have created a simple sample to reproduce the reported issue “PDF document is not loaded properly” in our side, but the behavior is working as expected. Please find the sample in the below link for your reference.  
Kindly share the following details to analyze more on this issue and assist you with the better solution   
1.       Simple sample/ modify the above sample to reproduce the issue.  
2.       Replication procedure to reproduce the issue.    
Regards,  
Aravindh Sathiyamoorthy. 


Hey Aravindh thanks for your help. i tried to do step by step using your proyect and solved it. and this example code in your radial menu is making the PDF image to be like my screenshots.
im not assigning any Static Resource to the PDF component is this how is intended to work? , Sorry im a newbie using WPF, does 
Style TargetType="Image" takes all the components with that target type?

In bold is the part that makes my PDF image go Small

    <Window.Resources>
        <SolidColorBrush x:Key="PointerOverBrush" Color="LightGray"></SolidColorBrush>
        <Style TargetType="Image">
            <Setter Property="Width" Value="16"/>
            <Setter Property="Stretch" Value="Uniform"/>
        </Style>
        <Style TargetType="TextBlock">
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="Margin" Value="3"/>
        </Style>
        <Style x:Key="NavigationButtonStyle" TargetType="Button">
            <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
            <Setter Property="BorderBrush" Value="#FF464646"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Background="Transparent" Margin="-5">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="PointerOver">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundEllipse">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PointerOverBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>

                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Ellipse Fill="Transparent" x:Name="BackgroundEllipse" />
                            <Ellipse Stroke="{TemplateBinding BorderBrush}" StrokeThickness="2"  Fill="Transparent"/>
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

Aravindh Sathiyamoorthy [Syncfusion]
Replied On July 19, 2019 11:32 AM UTC

  
We have checked the given code snippet and in that we see the style TargetType value is set as “Image”. When you do this so the style of the PdfViewerControl image will get overridden and makes the images look very small and this is not recommendable. Could you please provide us more details on your use case and the requirement, as that would help us provide more appropriate solution at the earliest. 
 
Regards, 
Aravindh Sathiyamoorthy. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon