Closed Sbolder closed 6 years ago
Hi, i have need to modify pdf. I do query from oracle database and return lob datatype, how can i open this with function hummus.PDFRStreamForFile(param);
const inStream = new hummus.PDFRStreamForFile(queryResult.blobData); const outStream = new hummus.PDFWStreamForFile('/home/davide/Doc/result.pdf'); const pdfWriter = hummus.createWriterToModify(inStream, outStream); let pageModifier = new hummus.PDFPageModifier(pdfWriter, 0); pageModifier.startContext().getContext().writeText( 'Test Text', 75, 805, { font: pdfWriter.getFontForFile('/home/davide/doc/Couri.ttf'), size: 14, colorspace: 'gray', color: 0x00 } ); pageModifier.endContext().writePage(); pdfWriter.end(); inStream.close(() => { console.log('inStream done'); }); outStream.close(); }) .catch(error =>{ console.log("ERRORE", error); })
Use function PDFRStreamForBuffer to load InStream variable.
const inStream = new hummus.PDFRStreamForBuffer(buffer);
Hi, i have need to modify pdf. I do query from oracle database and return lob datatype, how can i open this with function hummus.PDFRStreamForFile(param);