Start of primitive pdf generation