Telerik Forums
UI for WPF Forum
1 answer
133 views

   I have a PDF file that's been imported into a MemoryStream object and now I need to display it using the Telerik UI for WPF pdfViewer control.  The existing documentation says that you can create a PdfDocumentSource object and bind the pdfViewer.DocumentSource to that.  However, either PdfDocumentSource no longer exists, or I can't figure out what the correct Namespace is.

   I'm using TelerikUI for WPF v2024 Q2.  However changelogs for 2020 (https://docs.telerik.com/devtools/wpf/controls/radpdfviewer/changes-and-backward-compatibility/backward-compatibility)  say that: 

Changed
Obsolete constructors of Telerik.Windows.Documents.Fixed.PdfDocumentSource:

PdfDocumentSource(Uri uri, FormatProviderSettings settings)
PdfDocumentSource(Stream stream, FormatProviderSettings settings)
What to do now
Use the overloads that accept Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.PdfImportSettings instead.

   I've also read that there is some kind of merge going on trying to replace the previous PDF code with Telerik.Windows.Documents.Fixed .  In any case, I can't seem to figure out how to go from a MemoryStream to something that the pdfViewer.DocumentSource likes.  

   Can anyone help with a very basic code sample to take a PDF as a memorystream and create something that pdfView.DocumentSource will accept?  Thank you!

 

Dimitar
Telerik team
 answered on 07 Jun 2024
1 answer
61 views

Hey,

as in the titel is there a event or workaround to know if a userer startet to type inside a pdf text field. I just need it to set a bool true to inform the user that there is a possibility to lose data.

 

Thanks

Dominik

Dimitar
Telerik team
 answered on 28 Mar 2024
1 answer
72 views

As in the title it doesnt work so the movement on the document isnt great.

 

Thanks for the help

Dominik

Dimitar
Telerik team
 answered on 12 Mar 2024
0 answers
50 views

As in the title some charactes are getting not displayed in some pdfs.

If I import this pdf: https://jmp.sh/s/mdWM2qNDL2Oi6Yd825s0

Im getting this result its right if you click inside the field but its not getting displayed correct when not inside the field

 

Maybe its something with the font, thats the only thing i could think of.

 

Thanks for the help

Dominik

 

 

Dominik
Top achievements
Rank 1
Iron
Iron
 updated question on 21 Feb 2024
1 answer
73 views

Hey im using the telerik PercentComboBox and i want to change language of the FitToPage and FitToWidthto be displayed in german.

 

  <telerik:PercentComboBox DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type local:DialogControl}}}"
                           Value="{Binding ScaleFactor,ElementName=pdfViewer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                           RadPdfViewer="{Binding ElementName=pdfViewer}" ShowFitToWidth="True" ShowFitToPage="True"
                           telerik:Windows11ThemeSizeHelper.EnableDynamicAnimation="True" Language="de-DE">
      <telerik:PercentComboBox.PercentValues>
          <telerik:Percent Value="200"/>
          <telerik:Percent Value="150"/>
          <telerik:Percent Value="125"/>
          <telerik:Percent Value="110"/>
          <telerik:Percent Value="100"/>
          <telerik:Percent Value="90"/>
          <telerik:Percent Value="75"/>
          <telerik:Percent Value="50"/>
          <telerik:Percent Value="30"/>
      </telerik:PercentComboBox.PercentValues>
  </telerik:PercentComboBox>

 

Hope there is a way. Thanks

Dominik

Stenly
Telerik team
 answered on 12 Dec 2023
1 answer
92 views

Hey,

I have set my TextField to ReadOnly but the RadPdfViewer doesnt react to it. Im getting a pdf File that im importing using the telerik PdfFormatProvider after that im trying to set some of the fields to readOnly like this: 

if (formField is TextBoxField textBox)
{
	if (field is not null)
	{
	
		textBox.Value = field.ViewValue(viewMode);
		if (field.VarType != 0)
			formField.IsReadOnly = true;
			
	}
}

 

Im sure its setting it because if i export it to a pdf the fields are set to ReadOnly but not in the Telerik PdfViewer

 

Thanks

Dominik

Martin Ivanov
Telerik team
 answered on 01 Dec 2023
0 answers
90 views

We updated our WPF Telerik controls from 2021.3.1109 to 2023.3.1114 and now our RadPDFViewer is not displaying text on some PDF documents. Please see before and after images. 

Before:

After:

The file is a form fill PDF document that has been flattened. This displays correctly in Acrobat, Acrobat Reader, Chrome and Edge. 

We also opened the file the 2023.3.1114 PDFViewer demo with the same results.

Roger
Top achievements
Rank 1
 asked on 30 Nov 2023
1 answer
88 views

Hello all,

I'm using Telerik in WPF application and there are some pdf files that are not shown, the specificity of the files is that they are scanned .

 

Please can any one has this pb before?

 

Thank

Dimitar
Telerik team
 answered on 20 Nov 2023
0 answers
76 views

So I've got an application that has been working for the last 2 years with no issue. All of a sudden on some machines the radPdfViewer will not load or display PDFs. I've updated the code to the most recent version of the Telerik WPF UI controls but nothing different. The application works fine on my dev machine and a handful of others, but there are 3 machines specifically that it fails to load on. No errors just does not load. Has anyone else encountered this issue?

Here is the relevant code snippet:
Uri documentSourceUri = new Uri("https://www.somedomain.com/printables/paview.php?get_permitNumber=" + permitNumber);
PdfDocumentSource documentSource = new PdfDocumentSource(documentSourceUri);
pdfViewer.DocumentSource = documentSource;

Clint
Top achievements
Rank 1
 asked on 02 Nov 2023
1 answer
77 views

Hey,

as in the title the event doesnt trigger. It does work with the Widget "WidgetContentType = TwoStatesContent".

Im using a custom form for testing: https://pdfhost.io/v/xQU.fKEP6_24_anlage01_bauantrag_2021https://pdfhost.io/edit?doc=5b66dfdd-fafc-4589-bad0-c1608a8ecf1c

Thanks

Dominik


Dimitar
Telerik team
 answered on 24 Oct 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?