You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.
When I add image to the pdf and open it, the image does not appear, however if I reopen the pdf for the second time the image appears.
openpdf ()
{
this.pdfmake.addText('Your Package contents are as follows');
this.pdfmake.addText('Property Details');
this.pdfmake.addText(this.packageData.property.property_type);
this.pdfmake.addText(this.packageData.property.configuration);
this.pdfmake.addText("-----------------------------------------------------------------------------------------------------------------------------");
if(this.assetsByRoom.length){
for(let i=0;i<this.assetsByRoom.length;i++)
{
this.pdfmake.addText(this.assetsByRoom[i].name);
if(this.assetsByRoom[i].assets)
{
for(let j=0;j<this.assetsByRoom[i].assets.length;j++)
{
console.log('Exexuting 1stline',this.assetsByRoom[i].assets[j].asset_name);
this.pdfmake.addText(this.assetsByRoom[i].assets[j].asset_name);
console.log('Exexuting 2ndline',this.assetsByRoom[i].assets[j].asset_price);
this.pdfmake.addText(this.assetsByRoom[i].assets[j].asset_price);
console.log('assetImageUrl3rdline',this.assetsByRoom[i].assets[j].asset_image);
this.pdfmake.addImage(this.assetsByRoom[i].assets[j].asset_image,300,150);
// this.pdfmake.addImage('http://localhost:3000/assets/5a82d4a7b7e7446775be4e23/5a82d4a7b7e7446775be4e23.jpg',300,150);
// this.pdfmake.addImage('http://upload.wikimedia.org/wikipedia/commons/4/4a/Logo_2013_Google.png');
}
}
this.pdfmake.addText('Room Subtotal');
this.pdfmake.addText(this.assetsByRoom[i].subTotal);
this.pdfmake.addText("-----------------------------------------------------------------------------------------------------------------------------");
}
}
The text was updated successfully, but these errors were encountered:
When I add image to the pdf and open it, the image does not appear, however if I reopen the pdf for the second time the image appears.
openpdf ()
{
this.pdfmake.addText('Your Package contents are as follows');
this.pdfmake.addText('Property Details');
this.pdfmake.addText(this.packageData.property.property_type);
this.pdfmake.addText(this.packageData.property.configuration);
this.pdfmake.addText("-----------------------------------------------------------------------------------------------------------------------------");
if(this.assetsByRoom.length){
for(let i=0;i<this.assetsByRoom.length;i++)
{
this.pdfmake.addText(this.assetsByRoom[i].name);
if(this.assetsByRoom[i].assets)
{
for(let j=0;j<this.assetsByRoom[i].assets.length;j++)
{
console.log('Exexuting 1stline',this.assetsByRoom[i].assets[j].asset_name);
this.pdfmake.addText(this.assetsByRoom[i].assets[j].asset_name);
console.log('Exexuting 2ndline',this.assetsByRoom[i].assets[j].asset_price);
this.pdfmake.addText(this.assetsByRoom[i].assets[j].asset_price);
console.log('assetImageUrl3rdline',this.assetsByRoom[i].assets[j].asset_image);
this.pdfmake.addImage(this.assetsByRoom[i].assets[j].asset_image,300,150);
// this.pdfmake.addImage('http://localhost:3000/assets/5a82d4a7b7e7446775be4e23/5a82d4a7b7e7446775be4e23.jpg',300,150);
// this.pdfmake.addImage('http://upload.wikimedia.org/wikipedia/commons/4/4a/Logo_2013_Google.png');
}
}
this.pdfmake.addText('Room Subtotal');
this.pdfmake.addText(this.assetsByRoom[i].subTotal);
this.pdfmake.addText("-----------------------------------------------------------------------------------------------------------------------------");
}
}
The text was updated successfully, but these errors were encountered: