Skip to content

Commit

Permalink
Merge pull request #60 from rakeshSgr/4.8_issue
Browse files Browse the repository at this point in the history
4.8 pdf alignment issue
  • Loading branch information
aks30 authored Apr 27, 2022
2 parents 388e5cd + c83b715 commit 0d4f04a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
15 changes: 15 additions & 0 deletions helper/common_handler_v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,14 @@ exports.unnatiViewFullReportPdfGeneration = async function (responseData) {
filename: 'index.html'
}
});

FormData.push({
value: fs.createReadStream(dir + '/style.css'),
options: {
filename: 'style.css'
}
});

optionsHtmlToPdf.formData.files = FormData;


Expand Down Expand Up @@ -2343,6 +2351,13 @@ exports.unnatiEntityReportPdfGeneration = async function (entityReportData) {
filename: 'index.html'
}
});
formData.push({
value: fs.createReadStream(dir + '/style.css'),
options: {
filename: 'style.css'
}
});

optionsHtmlToPdf.formData.files = formData;

rp(optionsHtmlToPdf)
Expand Down
12 changes: 3 additions & 9 deletions views/unnatiEntityReport.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

Expand Down Expand Up @@ -192,7 +186,7 @@
<img src="<%= data.chartData[0].options.filename %>" style="width:75%">
<% } %>
<% } %>
<div class="row">
<div class="row" style="padding-top: 10px;padding-bottom:30px;">
<div style="width:40%; float:left;">
<h4>Category Wise Reports</h4>
</div>
Expand Down
11 changes: 3 additions & 8 deletions views/unnatiViewFullReport.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>
Expand Down

0 comments on commit 0d4f04a

Please sign in to comment.