In our C# project we're using WKHTMLTOPDF to create PDF documents out of HTML. Now we want to use our purchased SyncFusion-Libraries to generate PDF/A compliant PDF-Files. This SEEMS to work. If we open the PDF-Files in Acrobat, they are shown as PDF/A compliant.
But if we want to copy text out of the generated PDF/A-Files, it will paste as this:
Copy & Paste from the original PDF is working:
My First Heading
My first paragraph.
I broke down the code to a minimum example:
using Syncfusion.Pdf;
using Syncfusion.Pdf.Parsing;
namespace SyncFusionCreatePdfA_Test
{
class Program
{
static void Main(string[] args)
{
// -------------------------------
// The "Sample.html" looks like:
// -------------------------------
// <!DOCTYPE html>
// <html>
// <body>
// <h1>My First Heading</h1>
// <p>My first paragraph.</p>
// </body>
// </html>
//The "sample.pdf" generated by WkHtmlToPdf out of the "Sample.html"
var loadedDoc = new PdfLoadedDocument(@"C:\Users\reichert\Downloads\sample.pdf");
loadedDoc.ConvertToPDFA(PdfConformanceLevel.Pdf_A1B);
loadedDoc.Save(@"C:\Users\reichert\Downloads\sample_pdfa.pdf");
loadedDoc.Close(true);
}
}
}
Question: How can I create a PDF/A with SyncFusion, from which I can copy text correctly?
Sample-Files: sample.html sample.pdf samplepdfa.pdf
We have already fixed a similar type of reported issue in our recent version. So if possible, kindly please upgrade your product version to (19.1.0.69) to overcome this issue. Please find the latest NuGet link,
NuGet Link: https://www.nuget.org/packages/Syncfusion.Pdf.Wpf/19.1.0.69
We have attached the output document which are generated from the latest version,
Output: https://www.syncfusion.com/downloads/support/directtrac/general/pd/Sample_A1b_Latest-738805176
Note: I work for Syncfusion.