we are using Spire.PDF .NET to embedd attachments in a pdf and get evaluation warnings in output pdf.
We purchased 3 x Spire.PDF for .NET Edition Developer OEM (info@alos.de) and found out that starting from version 9.10.2 the evaluation warning exist in output. Version 9.9.9 does not print evaluation warning. We tried embedding license as resource but also using recommended Spire.Pdf.License.LicenseProvider.SetLicenseKey(key) method.
The problem is not reproducable on all machines used.
Sample code:
- Code: Select all
private static void Main(string[] args)
{
string key = "<from-license-file>";
Spire.Pdf.License.LicenseProvider.SetLicenseKey(key);
string inputPdf = "./input.pdf";
string textFile = "./Textdatei.txt";
string outputPdf = "./Output.pdf";
using var ms = new MemoryStream();
var converter = new PdfStandardsConverter(inputPdf);
converter.ToPdfA3A(ms);
ms.Position = 0;
using var pdf3a = new PdfDocument(ms)
{
FileInfo =
{
CrossReferenceType = PdfCrossReferenceType.CrossReferenceTable,
Version = Spire.Pdf.PdfVersion.Version1_4
}
};
var pdfAttachment = new PdfAttachment(Path.GetFileName(textFile), File.OpenRead(textFile))
{
Description = "desc",
FileName = Path.GetFileName(textFile),
MimeType = "text/plain",
CreationDate = DateTime.Now,
ModificationDate = DateTime.Now,
};
var attachmentRelationship = PdfAttachmentRelationship.Data;
pdf3a.Attachments.Add(pdfAttachment, pdf3a, attachmentRelationship);
pdf3a.SaveToFile(outputPdf);
}
Best Regards
Boris