PDF using Server Connect or Server-side?

Server-side or front-end PDF using Server Connect?

Can I create a list based on linked server or server workflow?
I know you have the PDF of wappler, but I don't have the data in a list on the front and I may need a lot of data. how to do?

Thanks

Hello @Ewerton_Luiz_Oliveir

Not for the moment, but you can use base64 and do some work on the serverside:

And use:

Using this with sendgrid api and having no issues so far..

Also you can check some great extensions:
https://community.wappler.io/search?q=pdf%20%23wappler-extensions

1 Like

I appreciate that. I'll have to learn how to use this. My knowledge is not advanced.
Let's go ahead Thank you

Can you tell us what are you trying to do?
Maybe we can help you out..
Recently tested 2 extensions on NodeJS:

Base64 (great for attachments on mails API like sendgrid):


image


And also:


image


Also created a workflow so I can create some invoice:
image

Only one problem: don't use latest puppeteer version...

1 Like

Sorry for the delay in your response.

I really need something similar to what you have. In my case, it is to get sales data, such as buyer name, amount paid, name of the item purchased...

I tried to follow the tutorials, but I couldn't make any progress. The module is installed, but I could not solve the problem below

{"status":"500","code":"MODULE_NOT_FOUND","message":"Cannot find module 'puppeteer'\nRequires stack:\n- /opt/node_app/extensions/server_connect/modules/HtmlToPDF.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js","stack":"Error: Cannot find module 'puppeteer'\nRequires stack:\n- /opt/node_app/extensions/server_connect/modules/HtmlToPDF.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js\n in Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)\n in Function._load (node:internal/modules/cjs/loader:1055:27)\n in TracingChannel.traceSync (node:diagnostics_channel:322:14)\n in wrapModuleLoad (node:internal/modules/cjs/loader:220:24)\n in Module.require (node:internal/modules/cjs/loader:1311:12)\n in require (node:internal/modules/helpers:136:16)\n in Object. (/opt/node_app/extensions/server_connect/modules/HtmlToPDF.js:1:19)\n in Module._compile (node:internal/modules/cjs/loader:1554:14)\n in Object..js (node:internal/modules/cjs/loader:1706:10)\n in Module.load (node:internal/modules/cjs/loader:1289:32)\n in Function._load (node:internal/modules/cjs/loader:1108:12)\n at TracingChannel.traceSync (node:diagnostics_channel:322:14)\n at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)\n at Module.require (node:internal/modules/cjs/loader:1311:12)\n at require (node:internal/modules/helpers:136:16)\n at App._exec (/opt/node_app/lib/core/app.js:704:20)"}

My knowledge is not advanced and I won't be able to do this alone. But I really appreciate the help

You need to install puppeteer, try v5 which works for me with npm install puppeteer@5 if you're not on localhost remember to upload package.json and do npm install on your server too..

I didn't understand how to upload package.json. I'm using Docker

Sorry, I don't use docker, but you can take a look at sid's topic where they talk about it: https://community.wappler.io/t/html-to-pdf-action-nodejs-php-open-source/29626

1 Like