18 Answers, 1 is accepted
The error you are getting sounds like you do not have reference to Telerik.Windows.Controls.Input.dll. Please, try to add this reference and let us know if you are still experiencing the issue.
Sample source code you can find in our online demo here.
If you have further questions do not hesitate to contact us.
Kind regards,
Kammen
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I downloaded the Q32011 release (trial version) and am trying out the new RadPdfViewer. Firstly my xaml file just kept on getting crashed unless I had to comment the PdfViewer out. After that I tried adding it through code behind and it didn't error out, but the pdfViewer didn't display my pdf. Just a blank screen. I have attached a screen shot and sample code. Any help would be appreciated.
Code:
Try
Dim pdfViewer As RadPdfViewer
pdfViewer = New RadPdfViewer With {.DocumentSource = New PdfDocumentSource(New System.Uri("/TestingTelerikNewRelease;component/Assets/Resources/How_Would_You_Move_Mount_Fuji.pdf", UriKind.Relative))}
LayoutRoot.Children.Add(pdfViewer)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Thanks
We are also facing the same problem, when we are passing the path to document source of pdfviewer in silverlight,
it will throw an error , the file does not exist.Can you give me some helpful suggestion
Thanks
Nikhil
Actually the reason for the behavior you are observing is probably different.
@Rocky
It is possible that the PDF file you are trying to open cannot be opened due to its contents. You can try opening the file in our online demo, which uses 2011 Q3 SP1 (2011.3.1220). If the file is not shown, then this theory will be verified. In that case, we would appreciate it if you could open a support ticket and attach the file. We would be able to shed some more light on the unsupported part of the content, as well as a time frame of when the content will be supported.
@ Nikhil
In your case, the problem is that the file cannot be located. Please, check if the file is added as a resource in the project and that the path is correct. More information on this can be found in this article.
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
1st. I am using PDF Sharp to convert Tiffs to PDF.
The generated files open fine in Acrobat Reader.
I then switched to memory stream (Instead of writing file out) and set it to the source for the PDF viewer. Page number is correct but each page is blank.
I thought there might be an issue with MS so I saved file opened file in viewer directly. Same issue.
issue also exists on your sample page with SL viewer.
Your acceptable extensions do not allow for me to attach a pdf sample.
Hello John,
Currently, images in tiff format are not supported by RadPdfViewer. However, we will do our best to implement a tiff filter for the Q1 release.When it comes to attaching files, only images can be attached to forum posts. In that regard, we would appreciate it if you could open a support ticket and send us a sample file to further investigate the problem.
Regards,
Kammen
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Im my development xaml design view, the pdf is showing the preview, but on a debug mode, it is showing only black screen.
Am I missing something .
Thanks in advance.
Robert
This may be caused by wrong DocumentSource. For example, if you have a PDF document in your application, and you set the DocumentSource = "document.pdf" in XAML, it will show in design mode, but not at runtime.
The URI should be DocumentSource = "[YourApplication];component/document.pdf".
Regards,
Kammen
the Telerik team
RadPdfViewer partially supports CCITTFaxDecode (that is basically TIFF). There are some limitations that are not supported at this stage like EncodedByteAlign = true or Group 3, 2-D encoding. At this point, implementing finer support for TIFF images is not on our roadmap, but I have created a PITS issue which you can vote for and use to track our plans:
You can follow the PITS Issue by its ID: 10758
Here you can find the PITS Issue: Public URL
On the other hand, there is a way to implement your own encoder and to register it in RadPdfViewer. You can download the source of the controls to see how the other decoders have been implemented. We have provided API for plugging custom decoders which the PdfViewer will use instead of the default ones.
Kind regards,
Kammen
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
We have a telerik pdf viewer in XAML and load pdf file from stream
PDFview.pdfViewer.DocumentSource = New PdfDocumentSource(New MemoryStream(_docData.Data))
but some pdf files e.g.TelerikReporting-LearningGuide.pdf are displayed incorrect (wrong encoding, strange signs or is not displayed att all without error message)
Would be very grateful for any hint.
Best regards
Elena
The issue should be solved in the latest version (Q1 2013).
Greetings,
Kammen
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I have the same problem to display the pdf file at run time. It can show on the design viewer but not at run time. My application is named "RadControlsSilverlightPdf" and the pdf file was saved at "../pdf/test.pdf". If I set the URI as DocumentSource="pdf/test.pdf", it can display the pdf file in the design viewer, but not at the run time. Followed your suggestion to set the URI to
DocumentSource="[RadControlsSilverlightPdf]; component/pdf/test.pdf"
It even did not show in the design viewer.
Please see the screenshot image.
Thanks
Sheng
As Kamen explained in a previous post, to show a PDF document both in design mode and runtime, the DocumentSource URI should be in the following format: "[YourApplication];component/document.pdf" where the brackets aim to indicate the application name and are not included in the actual URI.
With regard to your application it will look like this: DocumentSource="RadControlsSilverlightPdf;component/pdf/test.pdf".
I hope this solves your problem. Please, let us know if you need any other assistance.
Vasil
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Great this have solved my problem. My new question is: "Could you please provide a sample code in C# for run time setting the URI? Since I want to load different pdf file based on the user request."
Thanks
Qiping
1. The code on your demo side http://demos.telerik.com/silverlight/#Touch/PdfViewer/FirstLook. looks really cool. I have copied the sample code to my project. But I noticed that I need the dll
xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=QuickStart.Common"
How can I get this? Do you have this in the trial version? I did not see it in my trial version. I think without this the code could not recognize
Visibility="{Binding OpenCommandDescriptor.IsEnabled, Converter={StaticResource BoolToVisibilityConverter}}" in the xaml file.
2. Also When I try to load the pdf file by setting the URI in C# code.
this
.pdfViewer.DocumentSource =
new
PdfDocumentSource(
new
System.Uri(
"DocumentSource;component/Sample.pdf"
, System.UriKind.Relative));
PdfDocumentSource
could not be found. Which reference I need to add? I do haveFixedDocumentViewers.dll and Documents.Fixed.dll included in my reference. But why it still not working? Please see the attached image.
Thanks
Qiping
Other than our online examples, you should take a look at the SDK repository as well. It is developer-oriented and you can download and run the projects locally.
That said, the assembly and respectively - namespace you are referring to are implemented for the purposes of the application holding the online examples. It is not shipped with the controls and not needed in order to use RadPdfViewer. All needed assemblies are listed in this help article.
As for the issue at hand, the Telerik.Windows.Documents.Fixed namespace is missing from your code. Adding it should resolve the problem and everything should run smoothly.
using
Telerik.Windows.Documents.Fixed;
I hope this helps!
Regards,
Petya
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Conversion;
using YiigoImage Image = new YiigoImage();
// Convert TIFF to PDF documents
public void ConversionTIFFtoPdf();
{
string TIFFFileName = (@"C:\ yiigo_example.tif");
ImageFormat ImageFormat = ImageFormat.pdf;
}
public Image ConversionPdftoTIFF(@"C:\ yiigo_example.tif", ImageFormat.pdf);
doc.Save(@"C:\ yiigo_example.pdf");
// Convert PDF documents to TIFF
public Image ConversionPdftoTIFF();
{
string PdfFileName = (@"C:\ yiigo_example.pdf");
int PdfPageNumber = "1";
ImageFormat ImageFormat = ImageFormat.tif;
}
public void ConversionTIFFtoPdf(@"C:\ yiigo_example.pdf", "1", ImageFormat.tif);
doc.Save(@"C:\ yiigo_example.tif");
Best regards,
Arron