When exporting PDF documents containing images different than Jpeg and Jpeg2000 the PdfProcessing is using by default the ImageSharp library in order to convert these images to Jpeg.
It seems there is an issue in the older version of the ImageSharp library: Saving a PNG as Jpeg only processes a part of the image on .NET 6.
Workaround: This issue seems to be fixed in the current version (2.0.0) of the ImageSharp library.
Currently, the text extraction is following the behavior (text distance) as exported with Adobe.
Provide a setting in TextFormatProvider in order to keep the original distance as in the PDF document.
According to the PDF Specification: The first entry in the table (object number 0) is always free and has a generation number of 65,535;
An invalid xref table:
xref 1 3 0000000010 00000 n 0000000124 00000 n 0000011290 00000 n
xref 0 4 0000000000 65535 f 0000000010 00000 n 0000000124 00000 n 0000011290 00000 n
The table border styles are not imported correctly with a specific document.
Workaropund:
RtfFormatProvider provider = new RtfFormatProvider();
RadFlowDocument document = provider.Import(File.ReadAllText(@"..\..\test.rtf"));
PdfFormatProvider pdfProvider = new PdfFormatProvider();
var tables = document.EnumerateChildrenOfType<Table>();
foreach (var table in tables)
{
table.Borders = new TableBorders(new Border(BorderStyle.None));
}
using (FileStream stream = File.OpenWrite(@"..\..\result.pdf"))
{
pdfProvider.Export(document, stream);
}
With the current implementation, the permissions are ignored on import.
As a side note, there is an option to set permissions on export: UserAccessPermissions.