Syncfusion PDF library provides support to Layers, also known as Option Content refers to sections of content in a PDF document that can be selectively viewed or hidden by document authors or consumers. This capability is useful in items such as CAD drawings, layered artwork, maps, and multi-language documents.
Essential PDF provides support to create, add and merge the layers into a PDF document.
We have created a simple sample for your requirement, Please try this on your end and let us know the result:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/Create-a-new-PDF-document845748707
Follow the below links for more information,
https://help.syncfusion.com/file-formats/pdf/working-with-layers#toggling-the-visibility-of-layers