Update more code about barcode detect for comment and document.