tenta fix pdfservice.js
This commit is contained in:
1 parent
f1f1ee4826
commit
4a189f82b2
1 file changed
+15
@@ -45,6 +45,10 @@ export class PdfService {
|
||||
const timbradoUrl = config.timbradoUrl
|
||||
? `${process.env.FRONTEND_URL || 'http://localhost:5000'}${config.timbradoUrl}`
|
||||
: '';
|
||||
// Adiciona log para debug
|
||||
if (timbradoUrl) {
|
||||
console.log('[PDF] Timbrado inserido no HTML:', timbradoUrl);
|
||||
}
|
||||
return `
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -71,7 +75,17 @@ export class PdfService {
|
||||
body {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
/* Remove background-image do body para evitar problemas no Puppeteer */
|
||||
}
|
||||
.timbrado-bg {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 0;
|
||||
${timbradoUrl ? `background-image: url('${timbradoUrl}'); background-size: cover; background-position: center; background-repeat: no-repeat;` : ''}
|
||||
pointer-events: none;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
@@ -80,6 +94,7 @@ export class PdfService {
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
${timbradoUrl ? '<div class="timbrado-bg"></div>' : ''}
|
||||
<div class="content">
|
||||
${content}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user