Hello,
I use RadPdfViewer to view a PDF file in my WPF application, the PDF file has only one page and the contents are in the middle of the page, so I'm trying to zoom and focus on the middle of the page, I use the following code:
private void DocumentChanged(object sender, DocumentChangedEventArgs e)
{
pdfViewer.ScaleFactor = 1.3;
var size = pdfViewer.Document.Pages[0].Size;
pdfViewer.ScrollToVerticalOffset(size.Height * 0.3);
pdfViewer.ScrollToHorizontalOffset(size.Width * 0.20);
}
however, I only see the horizontal scroll working.
How can I zoom then scroll to vertical and horizontal offset?
I want to draw the signature box, like in Adobe Acrobat Reader.
This is very important when the document needs more than 1 signature.
<Window x:Class="YourProject.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MaquetteTelerikPDFViewer"
mc:Ignorable="d"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Title="MainWindow" Height="450" Width="800">
<Grid>
<telerik:RadPdfViewer x:Name="pdfViewer"/>
</Grid>
</Window>
public partial class MainWindow: Window
{
public MainWindow()
{
InitializeComponent();
}
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
using(Stream stream = new FileStream(@"radExport.pdf",FileMode.Open,FileAccess.Read)){
pdfViewer.Document = new PdfFormatProvider(stream).Import();
}
}
}
Images decoded with CCITTFaxDecode filter affect the performance when showing the document.
The exception is thrown with the message "Password is not correct" even when the user password is correct. This issue occurs for specific encryption algorithm parameters only.
This item is "Declined" because it is merged with another feedback item. Instead, you may follow this item: https://feedback.telerik.com/Project/143/Feedback/Details/155077-pdfviewer-text-is-displayed-as-rectangles-for-some-truetype-fonts
The Form XObjects are supported in RadPdfViewer. In case anyone has messed up this feature with the one for interactive forms and form filling, please, vote and subscribe to the corresponding item at http://feedback.telerik.com/Project/143/Feedback/Details/197877 .
I have a pdfviewer bound to a richtextbox like in your samples. But I want to keep the wpf viewer in fit to window scaling mode while changing the content of the richtextbox. Right now the pdfviewer will rescale to 100 % on each update.
The issue is closed as duplicated to the following item: http://feedback.telerik.com/Project/143/Feedback/Details/141105-tiling-patterns-are-rendered-wrong-when-some-transformation-is-applied