added TextToPDFv7

Properly writes the last staves. Able to handle a large input.