Use buffer for preview