When a PDF document contains images compressed with CCITTFaxDecode with applied BlackIs1 parameter, black color is visualized as white and white as black.
Default DctDecode implementation uses System.Windows.Media.Imaging.BitmapImage in order to get the image pixels. However, when the image uses some complex colorspace (for instance Separation based on CMYK) the BitmapImage is initialized with a different format and we use System.Windows.Media.Imaging.FormatConvertedBitmap in order to get the pixels in CMYK colorspace. There seems to be some issue with these calculations as the resulting image has incorrect pixels. WORKAROUND: You may inherit DctDecode class in order to implement custom decoder and call DecodeWithJpegDecoder method from the base class as mentioned in the note of this documentation article: http://docs.telerik.com/devtools/wpf/controls/radpdfviewer/customization-and-extensibility/customize-pdf-rendering A sample implementation of these custom decoder may be seen below: public class CustomDctDecode : DctDecode { public override byte[] Decode(PdfObject decodedObject, byte[] inputData, DecodeParameters parms) { return DecodeWithJpegDecoder(inputData); } }
Vertical lines with small length and big thickness are drawn as short horizontal lines with big StrokeThickess. This results in rendering them as big squares, which can hide parts of the content.
The text appears disordered due to wrong calculations of the glyph geometries.
It seems that the glyph outlines are rendered wrong for some specific CFF font files. For instance, the issue is reproducible with "Aleo-Light" font.
Currently, we have reproduced this issue with fonts AmnestyTradeGothic, OfficinaSanITC and OfficinaSanITC-Book.
When the first symbol in the text string array is empty the text translation is not taken into account.
/f-0-1 1 Tf
[<>-3775<0006>15<000700080002>15<0009>]TJ
This leads to a letter misplacement (too far from each other or overlapping each other).
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.