Create a new file with current file contents merged into a single pixel layer.
use scripting additions
set _file to ((path to desktop as text) & "Temp.png")
tell application "Pixelmator Pro"
activate
export the front document to file _file as PNG
open _file
end tell
tell application "Finder"
delete file _file
end tell