Filename on page if image
Closed this issue · 2 comments
2braincells2go commented
Hey, nice job! This is exactly what we need for a classroom project.
When adding an image, the image filename is shown above the image. How to remove the filename?
Looking at pdfmerge.js, not real clear what to modify. Your input appreciated.
bradsec commented
I'm going to add a toggle option for the filename text. At the moment just comment out the call to the drawWrappedText funcftion within the convertToPDF function. These lines -
// Set a preferred font size and maximum text width
const fontSize = 12;
const maxTextWidth = rightMargin - leftMargin;
// Calculate the position to draw the text at the top of the page
const textX = leftMargin;
const textY = pageHeight - 35;
// Draw the text
drawWrappedText(
page,
fileName,
textX,
textY,
maxTextWidth,
fontSize,
customFont,
fontSize,
"#000000"
);
2braincells2go commented
Thank you for reply.
That did the trick, appreciate it.