How to finetune using PDF documents ? Not in question answer method

How to finetune using PDF documents ? Not in question answer method, but to train the model, by using the pdf documents in a particular topic