We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const doc = new PDFDocument({autoFirstPage:false}); const stream = doc.pipe(new Base64Encode()); const fullnameKeys = ["firstname","fathername","lastname","id","img","img_url1","img_url2","img_url3"] //doc //.rect(0, 0, doc.page.width, doc.page.height).fill('#0A0A0A') data.map((item)=>{ const fullname = getValue(item.firstname) + ' ' + getValue(item.fathername) + ' ' + getValue(item.lastname); doc .addPage() .font("fonts/static/Cairo-Bold.ttf") //.rect(0, 0, doc.page.width, doc.page.height).fill('#0A0A0A') .fontSize(20) .fillColor('black') .text(fullname, {align:'center',features: ['rtla']}) doc.moveDown(1); Object.entries(item).forEach((entry) => { const [key, value] = entry; const string = key.toUpperCase() + " : " + getValue(value); if(!fullnameKeys.includes(key)){ doc .font("fonts/static/Cairo-Light.ttf") .fontSize(12) .fillColor('black') .text(key.toUpperCase(), {align:'left', continued: true}) .text(" : ", {align:'left', continued: true}) .text(getValue(value).length>0?getValue(value):' ', {align:'left',features: ['rtla']}); doc.moveDown(0.2); } }); doc.moveDown(2); }) doc.end(); ## Your environment * pdfkit version: 0.14.0 * Node version: 9.6.7 * Operating System: windows
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Globally background color
When I add data to pdf and the data overflow to next page, background color is not showing in the next page, any suggestion?
Code sample
The text was updated successfully, but these errors were encountered: