Fix error in building PDF

Fix error in building PDF.