Detect if PDF is B&W, Grayscale or RBG using Aspose.PDF for .NET

@carmenpdf

With simple merging while using Aspose.PDF for .NET 21.3, we noticed that the obtained/merged PDF was not completely tagged. The tags were not working in the 2nd page.

Facades.PdfFileEditor pfe = new Facades.PdfFileEditor();
pfe.CopyLogicalStructure = true;
pfe.CopyOutlines = true;
//pfe.KeepActions = true;
pfe.Concatenate(dataDir + "825_EN_Q3.pdf", dataDir + "4003_EN_Q3.pdf", dataDir + "result.pdf");

Furthermore, we used the complete code snippet that you provided and noticed the same Exception that you mentioned. We have logged an issue as PDFNET-49636 in our issue tracking system for the sake of further investigation. 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 apologize for the inconvenience.

PS: In the meanwhile, could you please share why do you need to modify tagged content and metadata of the resultant PDF file? It would help us in investigating the ticket accordingly.

Good morning,

I had similar issues before (with the “notes” and “annotations” from the clients PDFs) when the merge API did not work and because my tickets with Aspose free support were not resolved, I fixed the issues by modifying the tagged content of the output file.
With the notes and annotations I think that some field’s names and values taken from the original files were creating duplicates in the merged PDF. I was able to fix that with my code.
This time, with these new files I was not able to figure out the issue from the debug data, so I placed this ticket. I am assuming also duplicates but not sure where.
If you can present this info to the development team it would be greatly appreciated.
The client also wanted his metadata of the resultant PDF file to be from initial files.
Thank you.

If you can get back to me with the duplication location I would also be fine, as I will be able to modify my code and I can go live with the client’s files sooner than waiting for a new Aspose.PDF version.
Thank you.

@carmenpdf

Thanks for sharing the details.

We have logged the provided details along with the ticket and will consider it during the investigation. We will surely update you as soon as the logged ticket is investigated and fixed. Please give us some time.

We apologize for the inconvenience.