I want to create something in my Django project that physically prints a PDF file in the FileField of a model object onto paper. Like so:
class PDF(models.Model):
pdf = models.FileField(upload_to='pdffiles/', blank=True, null=True}
The main thing I want to do is make a link that creates a popup using Javascript that contains an input field where the user puts the name of the PDF from the object's FileField and a button that says "Print" that triggers the physical printing function (including opening the Print Dialog Box). Am I supposed to use forms or views in order to make this function, and if I'm supposed to use Javascript to activate the printing function, how would I do it? Thanks.
EDIT: I'm thinking of using print.js. Could someone tell me how to implement print.js in my Django project? What files from the Git repository do I need to insert and how do I link them to my templates?