I am using PDFBox to create PDF invoice in servlet, and the image is working in the local system but whenever trying to upload it on the server, it is not working
PDImageXObject pdImage = PDImageXObject.createFromFile("D:\\MyProject\\src\\Img2.png", invc);
PDPageContentStream cs = new PDPageContentStream(invc, mypage);
cs.drawImage(pdImage, 42, 670);
cs.beginText();
cs.newLineAtOffset(117, 724);
cs.endText();
Whenever giving the local path of the image it is showing in the pdf invoice, but after making it a war file upload to the server is getting the error: "Can't read input file".