The ImagesDeflaterCompressionLevel and ContentsDeflaterCompressionLevel in the PdfFormatProvider's export settings have 0 for default value instead of -1. Workaround: Change the settings's properties to -1 explicitly.
<!DOCTYPE html>
<html>
<body>
<div><p>RadDocument</p></div>
<div>Document</div>
</body>
</html>
The RtfFormatProvider does not take the fonts from the Font.Manager
Workaround:
Unregister all custom fonts and the use the FontSubstituting event to supply the correct fonts:
private void ImportSettings_FontSubstituting(object sender, Telerik.Windows.Documents.FormatProviders.FontSubstitutingEventArgs e)
{
var fonts = Wpf.Fonts.Fonts.GetAllAvailableFonts();
var ff = fonts.Where(x => x.Source == e.OriginalFontName).FirstOrDefault();
e.SubstitutionFontFamily = ff;
}
After the import is complete you can register the fonts again.
Paste some text inside RadRichTextEditor. If the text has more rows than the currently visible area you will see that the control does not scroll down to the caret position.
Workaround:
private void RadRichTextBox_CommandExecuted(object sender, CommandExecutedEventArgs e)
{
if (e.Command is PasteCommand)
{
Application.DoEvents();
bool cursorAtDocEnd = this.radRichTextBox.Document.CaretPosition.IsPositionAtDocumentEnd;
if (cursorAtDocEnd)
{
MoveCaretCommand command = new MoveCaretCommand(this.radRichTextBox.RichTextBoxElement);
command.Execute(MoveCaretDirections.Down);
}
}
}
Tab stops with visible tab leader (dot, hyphen, underscore) are not exported to PDF. Steps to reproduce: - Start with empty document - In Paragraph Properties dialog, choose Tabs - In Tab dialog, enter Tab stop position = 2, Leader = underscore, and press Set. Press OK - Add a word, press Tab, add another word - Export the text to PDF Expected: the words are separated with underscores in the exported PDF. Actual: the words are separated with blank space in the exported PDF.
Scenario 1:
The <br/> tags after </li> are treated as separate paragraphs and inherit the list styling of the previous paragraphs resulting in duplicate bullets.
Workaround:
var paragraphsToRemove = this.radRichTextBox.Document.EnumerateChildrenOfType<Paragraph>().Where(p => p.IsInList && p.Inlines.First() is Break);
foreach (var p in paragraphsToRemove)
{
p.ListId = -1;
}
this.radRichTextBox.UpdateEditorLayout();
Scenario 2:
The <br/> tags added as the last element of <li> are treated as break elements in the content, causing additional new lines in the document.
Workaround:
var paragraphsWithLineBreak = document.EnumerateChildrenOfType<Paragraph>().Where(p => p.IsInList && p.Inlines.Last() is Break);
foreach (var p in paragraphsWithLineBreak)
{
p.Inlines.Remove(p.Inlines.Last);
}
this.richtextbox.Document = document;