Import a document that contains a picture content control and the following error occurs:
Telerik.Windows.Documents.Flow.Model.Annotations.StructuredDocumentTags.Builders.SdtBuilderFailureException: 'Picture control cannot be used in selection that contains any non-image content, or more than a single image.'
Add support for pivot tables.
PdfFormatProvider: Add support for the "Automatically resize to fit contents" table property.
Multiple CSS classes on an element are not correctly resolved when converted to inline styles.
Before:
.TelerikNormal {font-family: Calibri;font-size: 14.6666666666667px;margin-top: 0px;margin-bottom: 0px;line-height: 100%;color: #000000;}
.TelerikHeading3 {font-family: Calibri Light;font-size: 22.6666666666667px;}
<p class="TelerikNormal TelerikHeading3"><span>Test</span></p>
Due to order priority, the TelerikHeading3 values override the TelerikNormal values. The font-size becomes 22.6666666666667px.
Convert:
provider.ExportSettings.StylesExportMode = StylesExportMode.Inline;
<p style="font-family: Calibri;font-size: 14.6666666666667px;margin-top: 0px;margin-bottom: 0px;line-height: 100%;color: #000000;"><span>Test</span></p>
The COUNTA function counts cells containing any type of information, including error values and empty text ("")
Introduce Sanitize Document functionality.
https://experienceleague.adobe.com/en/docs/document-cloud-learn/acrobat-learning/advanced-tasks/redact
https://helpx.adobe.com/acrobat/using/removing-sensitive-content-pdfs.html
For instance, we may implement WritePageAsync method in addition to the existing WritePage method. This is a similar scenario as in System.IO.StreamWriter class which has WriteLine and WriteLineAsync methods.
The PDF/A-1 standard uses the PDF Reference 1.4 and specifies two levels of compliance:
- PDF/A-1b - Its goal is to ensure reliable reproduction of the visual appearance of the document.
- PDF/A-1a - Its objective is to ensure that documents content can be searched and re-purposed. This compliance level has some additional requirements:
Since the PdfProcessing and its PdfFormatProvider is compliant with the PDF Reference 1.7. , the produced documents are created with this version as well:
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Streaming;
using Telerik.Windows.Documents.Fixed.Model.Editing;
using Telerik.Windows.Documents.Fixed.Model.InteractiveForms;
using Telerik.Windows.Documents.Fixed.Model;
using Telerik.Documents.Primitives;
using System.Diagnostics;
using System.Reflection.Metadata;
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf;
namespace _1681158PdfInputFields
{
internal class Program
{
static void Main(string[] args)
{
ExportExamplePdfForm();
}
public static void ExportExamplePdfForm()
{
RadFixedDocument fixedDoc = new RadFixedDocument();
RadFixedPage fixedPage = fixedDoc.Pages.AddPage();
FixedContentEditor editor = new FixedContentEditor(fixedPage);
editor.Position.Translate(100, 100);
TextBoxField textBox = new TextBoxField("textBox");
fixedDoc.AcroForm.FormFields.Add(textBox);
textBox.Value = "Sample text...";
Size widgetDimensions = new Size(200, 30);
DrawNextWidgetWithDescription(editor, "TextBox", (e) => e.DrawWidget(textBox, widgetDimensions));
string fileName = "output.pdf";
File.Delete(fileName);
// File.WriteAllBytes(fileName, new PdfFormatProvider().Export(fixedDoc, TimeSpan.FromSeconds(15)));
string ResultFileName = "result.pdf";
File.Delete(ResultFileName);
using (PdfStreamWriter writer = new PdfStreamWriter(File.OpenWrite(ResultFileName)))
{
foreach (RadFixedPage page in fixedDoc.Pages)
{
writer.WritePage(page);
}
}
ProcessStartInfo psi = new ProcessStartInfo()
{
FileName = ResultFileName,
UseShellExecute = true
};
Process.Start(psi);
Console.WriteLine("Document created.");
}
private static void DrawNextWidgetWithDescription(FixedContentEditor editor, string description, Action<FixedContentEditor> drawWidgetWithEditor)
{
double padding = 20;
drawWidgetWithEditor(editor);
Size annotationSize = editor.Root.Annotations[editor.Root.Annotations.Count - 1].Rect.Size;
double x = editor.Position.Matrix.OffsetX;
double y = editor.Position.Matrix.OffsetY;
Block block = new Block();
block.TextProperties.FontSize = 20;
block.VerticalAlignment = Telerik.Windows.Documents.Fixed.Model.Editing.Flow.VerticalAlignment.Center;
block.InsertText(description);
editor.Position.Translate(x + annotationSize.Width + padding, y);
editor.DrawBlock(block, new Size(editor.Root.Size.Width, annotationSize.Height));
editor.Position.Translate(x, y + annotationSize.Height + padding);
}
}
}