IOException when an object in the cross-reference stream has a negative offset.
"System.IO.IOException: An attempt was made to move the file pointer before the beginning of the file."
Trying to clone the Signature of a SignatureField leads to InvalidOperationException as the FieldName of the cloned signature is already set.
Workaround: Remove the signatures before the merging of the document:
private static void RemoveSignatures(RadFixedDocument document)
{
List<FormField> signatures = document.AcroForm.FormFields.Where(ff => ff.FieldType == FormFieldType.Signature).ToList();
if (signatures.Count > 0)
{
foreach (FormField signature in signatures)
{
document.AcroForm.FormFields.Remove(signature);
}
}
List<SignatureWidget> signatureWidgets = document.Annotations.Where(a => a.Type == AnnotationType.Widget && a.GetType() == typeof(SignatureWidget)).Cast<SignatureWidget>().ToList();
if (signatureWidgets.Count > 0)
{
foreach (var signatureWidget in signatureWidgets)
{
foreach (RadFixedPage page in document.Pages)
{
if (page.Annotations.Contains(signatureWidget))
{
page.Annotations.Remove(signatureWidget);
}
}
}
}
}
Wrong encoding is used when the PDF file contains font with custom encoding
Workaround:
foreach (var widget in field.Widgets)
{
widget.TextProperties.Font = FontsRepository.Helvetica;
}
The public API may be implemented as property of PdfExportSettings. Implementing this feature would help to easily workaround issue with PdfProcessing documents that cannot be opened on devices with iOS version 10.2 (due to the default FlateDecode compression).