how to print Open layer map in pdf

I have added open layer map with multiple layers and multiple shapes in php.
While exporting to PDF mutltiple layers are exporting with their specific button.
I am attaching screenshot for reference how it is printing in php page.

As shown in image same thing required in pdf 1

In pdf it is printing only 1 layer