Open nicosayer opened 5 years ago
Hi !
I'm trying to merge two PDFs like shown in the Wiki:
var pdfWriter = hummus.createWriter(__dirname + '/output.pdf'); pdfWriter.appendPDFPagesFromPDF(__dirname + '/file1.pdf'); pdfWriter.appendPDFPagesFromPDF(__dirname + '/file2.pdf'); pdfWriter.end();
But it throws an error everytime :
TypeError: unable to append page, make sure it's fine
And here are the logs :
[ 18/10/2019 14:39:19 ] PDFParser::ParseEOFLine, Couldn't find tokens in file [ 18/10/2019 14:39:19 ] PDFDocumentHandler::StartCopyingContext, failure occured while parsing PDF file.
The error seems to be coming from file1.pdf because when I try with this file : alternativeFile.pdf everything works just fine.
The difference between those two files is that file1.pdf uses a custom font (Tangerine) while alternativeFile.pdf only uses Helvetica.
file1.pdf
alternativeFile.pdf
Do you have any idea what is going wrong ?
Thanks!
Hi !
I'm trying to merge two PDFs like shown in the Wiki:
But it throws an error everytime :
And here are the logs :
The error seems to be coming from file1.pdf because when I try with this file : alternativeFile.pdf everything works just fine.
The difference between those two files is that
file1.pdf
uses a custom font (Tangerine) whilealternativeFile.pdf
only uses Helvetica.Do you have any idea what is going wrong ?
Thanks!