Convert Pdf to Pdf/ua

Hi
Im trying to convert a Pdf to PdfUa, I found some examples on how to it.

And from this I made this test-function

private void Convert()
{
  Document pdfDoc = new Document("C:\\Temp\\NotPdfua.pdf");

  var validateFileName = "c:\\temp\\ValidateError.xml";
  var errorFileName = "c:\\temp\\ConvertingError.xml";
  var validateAfterFileName = "c:\\temp\\ValidateAfterError.xml";

  if (pdfDoc.IsPdfUaCompliant)
  {
  }
  else
  {
    pdfDoc.Validate(validateFileName, PdfFormat.PDF_UA_1);
  }
  var conversionOption = new PdfFormatConversionOptions(errorFileName, PdfFormat.PDF_UA_1);

  pdfDoc.Convert(conversionOption);

  pdfDoc.Save("c:\\temp\\ConvertedPdf.pdf");
  
  var output = new MemoryStream();
  pdfDoc.Save(output, SaveFormat.Pdf);

  pdfDoc = new Document(output);
  pdfDoc.Save("c:\\temp\\ConvertedPdf2.pdf");

  var after = new MemoryStream(output.ToArray());
  var inputstream = new MemoryStream(after.ToArray());
  Document pdfDocAfter = new Document(inputstream);

  pdfDocAfter.Validate(validateAfterFileName, PdfFormat.PDF_UA_1);
  pdfDocAfter.Save("c:\\temp\\ConvertedPdf3.pdf");

}

But it doesn’t work at all nothing is changed in the converted documents, I guess I’m missing something important but I can’t see it.
Can you point me to a working example?

@Kurt1960

Would you please share your sample PDF with us as well so that we can test the scenario in our environment and address it accordingly?

It doesn’t matter what Pdf I try to convert nothing happens
But here is one of them

NotPdfua.pdf (35.7 KB)

@Kurt1960

Can you please check below attached output generated in our environment? Also, please let us know if you are using another tool as well to validate the compliance e.g. Adobe Preflight.

_out.pdf (36.0 KB)

I’m using this Tool to validate Validate PDF/UA – pdfix.io and it says that the _out.pdf you attached is not valid.

And I tried to run it through my Convert() test-function it says true in this line
if (pdfDoc.IsPdfUaCompliant)
{
}
but if I do a validation (pdfDoc.Validate(validateFileName, PdfFormat.PDF_UA_1)) it generate this output
ValidateError.zip (767 Bytes)

So what does that mean, is your _out.pdf pdf-ua compatible or not?
If yes, why these errors in the validations?

@Kurt1960

The log file contains the errors that API faces during the conversion process and generates an output. However, we need to investigate about this issue in more details and we have logged an issue as PDFNET-57185 in our issue tracking system for the purpose. We will look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi is there any progress on this bug

@Kurt1960

We are afraid that the ticket is not resolved yet. It will be prioritized on a first come first serve basis and as soon as we make some progress, we will let you know via this forum thread. Please spare us some time.

We apologize for the inconvenience.