Gantt Export Service cant export to pdf

Hello,
I have the ‘dhtmlxGantt - Enterprise License’ and am trying to use the Exporter Service 5.0 provided with it.
I have followed the instructions in a Windows machine and execute “npm install”, after i can launch the application with “npm start” and its listening on port 3200.
However, if i open /test/smoke-test-everything.html file and click the Gantt > node.js > and press PNG button, it function OK, This is the console log:

Blockquote
C:\software\export-service>npm start
gantt-pdf@0.5.6 start C:\software\export-service
node index.js
Working in standalone mode
User Check started
app listening at http://localhost:3200
Incoming request - Fri Oct 08 2021 09:52:08 GMT+0200 (GMT+02:00)
[source] root, undefined
queue.push { done: [Function: done] } connection_1633679528593
Request data parse 2021-10-08T07:52:08.598Z
[target] png, gantt.png
tempFolder C:/software/export-service/tempFolder/gantt/png/
tempname C:/software/export-service/tempFolder/gantt/png/page8759457.html data undefined
Target version 7.1 string
template folder C:/software/export-service/gantt/png/…/templates/
availableVersions [
‘7.0’, ‘6.2’,
‘6.0’, ‘5.1’,
‘5.0’, ‘4.2’,
‘4.0’, ‘3.2’,
‘3.0’
]
Selected templateVersion: 7.0
templateFilename: gantt-7.0-template.html
Template ready. Ready to start Electron 2021-10-08T07:52:08.610Z
Before starting electron connection_1633679528593 C:\software\export-service\gantt\png
connection_1633679528593 : working
[electron]
[electron] =========================================================================================================
No additional parameters, create a new object
__dirname C:\software\export-service\gantt\png
[electron] tempname, filename, params C:/software/export-service/tempFolder/gantt/png/page8759457.html C:/software/export-service/tempFolder/gantt/png/gantt.png {}
[electron] Electron started! 2021-10-08T07:52:10.088Z
[electron] Electron opened a new window, loading the HTML file
[electron] Page loaded 2021-10-08T07:52:10.186Z
additional_settings {}
Evaluating page sizes
[electron] dom ready
[electron] Page sizes: { height: 541, width: 741 }
[electron] Final export parameters: {
“x”: 0,
“y”: 0,
“width”: 741,
“height”: 541
}
[electron] Ready to export. 2021-10-08T07:52:11.226Z
[electron] PNG data: <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 02 e5 00 00 02 1d 08 06 00 00 00 9a fb 03 8a 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 20 00 … 24671 more bytes>
[electron] Saved C:/software/export-service/tempFolder/gantt/png/gantt.png. Size: 24721
Electron closed. exitCode: 0
lastError null
Export end 2021-10-08T07:52:11.390Z
return_file: C:/software/export-service/tempFolder/gantt/png/gantt.png
After convert function 2021-10-08T07:52:11.398Z
[ok] 25kb in 2800ms
Connection closed! connection_1633679528593

So if i execute click in PDT button, it open the new window web browser and never finish and close. this is the console log:

Blockquote
queue.push { done: [Function: done] } connection_1633679556105
Request data parse 2021-10-08T07:52:36.133Z
[target] pdf, gantt.pdf
tempFolder C:/software/export-service/tempFolder/gantt/pdf/
tempname C:/software/export-service/tempFolder/gantt/pdf/page1636890606.html data undefined
Target version 7.1 string
template folder C:/software/export-service/gantt/pdf/…/templates/
availableVersions [
‘7.0’, ‘6.2’,
‘6.0’, ‘5.1’,
‘5.0’, ‘4.2’,
‘4.0’, ‘3.2’,
‘3.0’
]
Selected templateVersion: 7.0
templateFilename: gantt-7.0-template.html
Template ready. Ready to start Electron 2021-10-08T07:52:36.142Z
Before starting electron connection_1633679556105 C:\software\export-service\gantt\pdf
connection_1633679556105 : working
[electron]
[electron] =========================================================================================================
arguments “{}”
No additional parameters, create a new object
[electron] Electron is starting! 2021-10-08T07:52:37.374Z
[electron] Electron opened a new window, loading the HTML file
[electron] Page loaded 2021-10-08T07:52:37.471Z
additional_settings {}
Evaluating page sizes
[electron] dom ready
[electron] Page sizes: { height: 541, width: 741 }
[electron] Final export parameters: {
“printBackground”: true,
“pageSize”: {
“width”: 130704.16666666667,
“height”: 102481.94444444444
},
“landscape”: false,
“marginsType”: 2
}
Ready to export. 2021-10-08T07:52:38.467Z

Can help me? thanks

Hello Jesus,
Do you have custom DPI settings or different font sizes?
If you do, it might be related to the following bug in Electron:

As suggested, you can try installing an older Electron version:

npm install electron@6.1
1 Like

Thank you so much. I installed electron6.1 and it worked ok :slight_smile:

El problema es electro, thanks!!