Given a pdf- can we extract its layer information?

I know we can use Layer class to add layers to pdf. However, I’m wondering if given a pdf document, is there any method to extract layer information to Layer class? If not, can we at least know whether it only has a single layer or it is multi-layered?

hmm…anyone can answer this yes or no question?

I tried to open a pdf Document using Aspose, extracted all its pages to PageCollection class. And I found Page.Layer for each page is null. So I guess we cannot extract layers from pdf currently?

Hi Menghui,


Thanks for your interest in our API’s and sorry for the delayed response.

I am afraid currently Aspose.Pdf does not support the feature to determine the number of layers in PDF document. However for the sake of implementation, we already have logged this requirement as PDFNEWNET-29786 in our issue tracking system. We will further look into the details of this requirement and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Hello! Thank you for your consideration! Would you be able to share any update now? Thank you so much!

Hi Menghui,


Thanks for your inquiry. I am afraid your requested feature is still not implemented. As currently our product team is busy in resolving other issues in the queue, reported earlier. We will notify you as soon as we made some significant progress towards your issue resolution.


We are sorry for the inconvenience caused.


Best Regards,

No problem. Thanks!

The issues you have found earlier (filed as PDFNET-29786) have been fixed in Aspose.PDF for .NET 21.10.