You can resolve this by changing the import statement
From: import PDFDocument from 'pdfkit';
import PDFDocument from 'pdfkit';
to: import * as PDFDocument from 'pdfkit';
import * as PDFDocument from 'pdfkit';