MuhammaraJS
MuhammaraJS copied to clipboard
Links are lost
I'm attempting to merge two PDF files, however, when doing so, it strips the links out. The code
const appendPdf = (inputPdfPathArray, outputPath) => {
const pdfWriter = muhammara.createWriter(outputPath)
for (const filePath of inputPdfPathArray) {
pdfWriter.appendPDFPagesFromPDF(filePath)
}
pdfWriter.end()
}
Thanks for reporting i could replicate this.
This may be relevant: https://github.com/galkahana/HummusJSSamples/blob/master/appending-pages-with-comments/appendWithComments.js
@mhassan1 Thanks for the suggestion, I've attempted to use it, however, the result is the same. I've attempted to debug a bit and apparently the params content is the following
params {
page: PDFPage {
rotate: 0,
artBox: undefined,
trimBox: undefined,
bleedBox: undefined,
cropBox: undefined,
mediaBox: [ 0, 0, 594.95996, 841.91998 ]
},
pageDictionaryContext: DictionaryContext {},
writer: PDFWriter {
events: EventEmitter {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
[Symbol(kCapture)]: false
}
}
}
im currently investigating other muhammara related issues, will come back to this. did not forgot it.
im currently investigating other muhammara related issues, will come back to this. did not forgot it.
Thanks @julianhille
It looks like PDF Writer does not support that so far. The appendPDF or mergePages etc function do not allow to set const ObjectIDTypeList& inCopyAdditionalObjects
maybe something is possible with CreateFormXObjectsFromPDF which allows setting the objectIds to be copied.