RadPDFViewer not rendering?

1 Answer 15 Views
PDFViewer
David
Top achievements
Rank 1
David asked on 01 May 2021, 02:38 AM

Hi,

 

I'm version locked at 2020.1.218. 

 

I'm not sure what I am doing wrong or has changed but suddenly I am no longer able to render pdf from a file or URL. The implementation was simple. Here is my snippet

PDFURL is a direct url string to a hosted PDF file.

 

var SavePathStr = @"%ALLUSERSPROFILE%\HES\" + Constants.TempNDApdf;
var SavePathFinal = Environment.ExpandEnvironmentVariables(SavePathStr);

                using (WebClient client = new WebClient())
                {
                    client.DownloadFile(PDFURL, SavePathFinal);


                }

 

 

pdfViewer.DocumentSource = new PdfDocumentSource(new Uri(SavePathFinal));

 

I've not have any issues doing it this way until recent compiles. I'm not sure what I broke.

 

 

if it helps, this is my xml using for RadPdfViewer,

 

        <telerik:RadPdfViewer x:Name="pdfViewer" BorderBrush="#286090" BorderThickness="2"
                Grid.Column="0" Grid.ColumnSpan="2" Margin="0,15,5,0"
                Grid.Row="0" Grid.RowSpan="3"  Background="Transparent"
                Width="875" Height="400"
                HorizontalAlignment="Right" VerticalAlignment="Center"

                              />

 

I'm not seeing any "errors" exactly, no exceptions thrown. I get a quick loading symbol and nothing happens. If I step into it to examine the new PdfDocumentSource, it says "Document" is null. 

                              

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 03 May 2021, 09:29 AM

Hi David,

We do not have other reports of similar issues. I have tested the method with the specified version and it is working as expected on my side. I would suggest opening a new support ticket and attaching the PDF file there. It seems to me that the file itself cannot be loaded for some reason. 

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
PDFViewer
Asked by
David
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or