The glyphs are rendered with additional unexpected lines when a specific custom CFF font is used to show them.
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?
This is reproducible for images with FlateDecode and predictor value in the range between 10 and 15. As an example you may take a look at the DecodeParms property in the following image PDF dictionary: << /BitsPerComponent 8 /ColorSpace /DeviceRGB /DecodeParms << /BitsPerComponent 8 /Colors 3 /Columns 1024 /Predictor 15 >> /Filter /FlateDecode /Height 2868 /Subtype /Image /Type /XObject /Width 1024 /Length 1236707 >>
Due to excessive memory consumption when decoding images, OutOfMemoryException can be thrown when viewing documents with large images inside them. Workarounds: - Set ExtensibilityManager.MaxImageSize = null. This will skip one resizing step, and could be beneficial in documents containing few large images. - Use 64-bit process for the client application. This allows the process to consume much more memory. Note that starting 64-bit process while debugging can be tricky, as described in this blog post: https://weblog.west-wind.com/posts/2016/Dec/19/Visual-Studio-Debugging-and-64-Bit-NET-Applications. Available in R1 2018 Official release version.
Some glyphs are not rendered correctly - the letter are translated or become unrecognizable.
When Windows11Theme is applied before the PdfViewer is initialized the CurrentPageTextBox is not loaded successfully.
Workaround: Set the ApplicationTheme after the InitializeComponent method:
public MainWindow()
{
InitializeComponent();
StyleManager.ApplicationTheme = new Windows11Theme();
}
Observed when loading a document: