Create Print Preview in JavaScript API 4.x

05-12-2021 03:46 PM
New Contributor III


In ESRI Javascript 3x version I have created a print preview to highlight the print area on the screen. User  will get an idea about the area included in the print output. I  used screenUtils API (3.x) for this purpose. While checking the functionality matrix I understand this is deprecated in the 4.x version and not planned to upgrade. The guidelines suggest to use MapView.toMap(), MapView.toScreen(), SceneView.toMap(), SceneView.toScreen(). attached a screen shot from the current 3.x version. Could some one suggest a working example using Javascript API 4.x to get similar output. a sandbox example would be really helpful


1 Reply
Esri Regular Contributor

Hi @SurendranNeelakantan, thanks for the question. We have this sample in the SDK that sounds like what you're looking for (and has a sandbox mode):

And here is a blog that has some really good tips and tricks about working with Screenshots:


0 Kudos