Measure the door in both positions
Open and close the sliding door before measuring for artwork. A fixed panel and a moving panel can use the wall differently, and the handle may come closer to the wall at one end of its travel. If the door runs along the wall surface, keep the canvas and its frame out of the full path. Mark the part of the wall that remains clear in both positions.
If the door slides into a wall pocket, find out where the pocket ends before planning a hanging point. Check the doorway drawing or instructions from its installer and choose another section of wall if the available fixing area is uncertain. Include the place a curtain or blind rests when open. The clear span available for art can be smaller than the distance between the trim and the corner.
Use the outline that still works when the door is in use
Put up a paper outline on the safe, clear section and step back to the doorway. Go through once with the door open and once with it shut. If you see a sliver of the print from the next room, shift the outline until the main shape stays readable. The larger angular shapes in Carbon Assembly offer a useful example for a glance along the wall.
Take the final width only after checking the door with its trim, handle and covering in their normal positions. When comparing the outside dimensions of a canvas and frame, allow for the available wall and the depth it projects into the walkway. The canvas framing guide explains where that extra width and depth come from.