Generating PDF with spiderbasic

Just starting out? Need help? Post your questions and find answers here.
loulou2522
Posts: 54
Joined: Wed Mar 18, 2015 5:52 am

Generating PDF with spiderbasic

Post by loulou2522 »

Has anyone tried to generate PDF with Spiderbasic on the \pbPDFmodule.pbi model or is there another solution?
Thanks in advance
plouf
Posts: 295
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: Generating PDF with spiderbasic

Post by plouf »

Its unlike to work
You meed js version like jspdf or similar
Christos
tj1010
Posts: 218
Joined: Wed May 27, 2015 1:36 pm
Contact:

Re: Generating PDF with spiderbasic

Post by tj1010 »

I looked at the ~five different JS based libraries and they all look like abandonware, or just had very bad support and documentation..

I still use RTF(Wordpad, LibreOffice>Writer etc..).. Cross-platform, same look and features in 1/8 the time.. The format you can learn in hours on a low level.. It's just not popular and it's old.. The only point PDF gets is most of the readers have toner saver on print.

This works it's jsPDF. Because of CORS you have to self-host the script(https://unpkg.com/jspdf@2.5.2/dist/jspdf.umd.js)

Code: Select all

Procedure MakePDF()
  !require(["/jspdf.umd.js"], ({ jsPDF }) => {
  !  const doc = new jsPDF();
  !  doc.text("Hello world!", 10, 10);
  !  doc.save("a4.pdf");
  !});
EndProcedure
MakePDF()
User avatar
bembulak
Posts: 95
Joined: Wed Feb 26, 2014 9:53 am

Re: Generating PDF with spiderbasic

Post by bembulak »

Based on a search in the forum, I'd also say jsPDF works. And indeed, I also had used it successfully in the past.

viewtopic.php?t=99

viewtopic.php?p=8364

Can't say what's the current status of jsPDF is though.
Kind regards,

bembulak
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Generating PDF with spiderbasic

Post by Peter »

bembulak wrote: Wed Jan 29, 2025 11:57 amviewtopic.php?p=8364
Funnily enough, this thread is from loulou2522 ;)
tj1010
Posts: 218
Joined: Wed May 27, 2015 1:36 pm
Contact:

Re: Generating PDF with spiderbasic

Post by tj1010 »

I just copy and pasted from the github readme and changed path because CORS. It worked here, and after looking at every single JS PDF library jsPDF seems the most maintained; even though the issues response on github are starting to look like abandonware..

I'm assuming the referenced PB library actually handles the format; never looked at it''s stability and features. jsPDF also does format level generation and seems to have all features.
Post Reply