When writing a RadFixedPage containing widgets using the PdfPageStreamWriter.WriteContent() method an exception is thrown.
The exception: System.ArgumentNullException: 'Value cannot be null. Parameter name: context'
From the PDF Specification: "An ink annotation represents a freehand “scribble” composed of one or more disjoint paths. When opened, it displays a pop-up window containing the text of the associated note."
Such fonts are:
Cell borders are not set when the border is set on the table:
<table border="1">
Currently RadFixedDocumentInfo is used only for export of Author, Title and Description document metadata properties. This should be extended to support custom properties. We should also implement the import of RadFixedDocumentInfo.
Currently, for .NET Framework scenarios, this could be achieved using RadPdfViewer's WPF control ThumbnailFactory class. Sample code may be seen at this forum post: http://www.telerik.com/forums/pdf-thumbnail-returns-transparent-images#jO33X-E8Cki_qLh_KsToWg.
The feature should be implemented for .NET Standard as well.
Provide API or mechanism for reusing the already embedded fonts instead of creating a new one when editing an existing document.
This causes an issue in adobe preflight (font name is not unique).
The issue is observed when performing merge with RadFixedDocument as well.
ImageSource imageSource =
new
ImageSource(
new
MemoryStream(
this
.ConvertWmfImageToPng(stream)));
document.Pages.AddPage().Content.AddImage(imageSource);
...
private
byte
[] ConvertWmfImageToPng(Stream wmfImageStream)
{
byte
[] pngBytes;
using
(MemoryStream pngImageStream =
new
MemoryStream())
{
System.Drawing.Image imageDrawing = System.Drawing.Image.FromStream(wmfImageStream);
imageDrawing.Save(pngImageStream, System.Drawing.Imaging.ImageFormat.Png);
pngBytes = pngImageStream.ToArray();
}
return
pngBytes;
}
Hidden fields with pushButton widget become visible when using FlattenFormFields method to flatten fields.
Workaround: do not flatten fields if the IsHidden property of any of its Widget's is set to True:
var fieldsList = formFields.ToList();
for (int i = 0; i < fieldsList.Count; i++)
{
var field = fieldsList[i];
bool flattenCurrentField = true;
if (field.FieldType == FormFieldType.PushButton)
{
PushButtonField pushButtonField = (PushButtonField)field;
PushButtonWidget[] widgets = pushButtonField.Widgets.ToArray();
foreach (var widget in widgets)
{
var baseType = typeof(PushButtonWidget).BaseType.BaseType.BaseType;
PropertyInfo[] properties = baseType.GetProperties(BindingFlags.NonPublic | BindingFlags.Instance);
PropertyInfo isHidden = properties.FirstOrDefault(p => p.Name == "IsHidden");
bool value = (bool)isHidden.GetValue(widget);
if (value == true)
{
flattenCurrentField = false;
break;
}
}
}
if (flattenCurrentField)
{
document.AcroForm.FlattenFormField(field);
}
}
Allow table spiting to be done on whole rows instead of splitting the content of the rows.
Attached is a small project that shows a possible workaround.
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);
}
Images could have orientation set in their metadata:
Workaround: Rotate the image before inserting it into the RadFixedPage (check the attached project).