A possible workaround could be to draw a rectangle around the desired Block.
RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = document.Pages.AddPage();
page.Size = new Size(600, 800);
FixedContentEditor editor = new FixedContentEditor(page);
editor.Position.Translate(defaultLeftIndent, 50);
Block block = new Block();
block.InsertText("PDF");
editor.DrawBlock(block);
Block border = new Block();
border.GraphicProperties.StrokeColor = RgbColors.Black;
border.GraphicProperties.IsFilled = false;
border.GraphicProperties.IsStroked = true;
border.GraphicProperties.StrokeThickness = 1;
border.InsertRectangle(new System.Windows.Rect(block.Measure()));
editor.DrawBlock(border);
ArgumentException is thrown while importing a choice field whose value is an empty string. Instead, the empty string should be imported.
Provide a way to change the Name of a FormField from the RadDocument.AcroForm.FormFields collection. As a workaround, you could create a new instance of a FormField with the desired name, add the new field in the document and remove the old one. You can use the following approach: 1) Create a new instance of FormField (with the desired name, passed in the constructor), which will play the role of a copy of a specific FormField 2) Copy all properties from the original field (they all vary, depending on the concrete type of the FormField, for example CheckBoxField, etc.) 3) Create a new widget for the new field, and copy all properties from the original field's widget into the new one. 4) Remove the original field from the RadDocument.AcroForm.FormFields collection and add the new field. 5) Remove the original widget from the corresponding page's annotation and add the new one. Attached is a project demonstrating this approach for a CheckBoxField.
When merging, only the widgets are copied but not their fields. This can lead to ArgumentNullException when exporting the document. Implement copying the fields and consider cases which include collision of names of the fields. Workaround: Repair the generated document using the following code:In case of Name collision, you can use the attached project or the attached project to the following feedback item to rename the duplicate fields: Provide a way to rename FormFields.foreach
(Widget widget
in
this
.pdfDocument.Annotations.Where(annot => annot.Type == AnnotationType.Widget))
{
if
(!
this
.pdfDocument.AcroForm.FormFields.Contains(widget.Field.Name))
{
this
.pdfDocument.AcroForm.FormFields.Add(widget.Field);
}
}
I am using the trial version of telerik for xamarin for .net core which was released last year, to convert pdf to text. Our service is hosted in Azure. The text which I get back, in certain cases the spaces are missing (say for example instead of 'I [am] here', it displays 'I[am]here'. This happens randomly.
The code which we have used is as follows -
byte[] pdfBinary = Convert.FromBase64String(inputString);Implement Replace method(s) which enable the users to replace a concrete string/content/text in a PDF document (RadFixedDocument).
Hello Telerik,
Last time we attempted this the <Viewbox> contents would not render and were empty upon xaml to pdf output. It would be great if you had this feature and we could move completely away from raster output to PDF for controls that contain Viewboxes. Otherwise we have really liked the PDF's created by the tool, the vector output is sharp as expected.
Thank you,
Patrick
WinAnsiEncoding it is imported as StandardEncoding since WinAnsiEncoding is still not implemented in RadPdfProcessing.