Author Topic: Creating PDF files  (Read 3769 times)

0 Members and 1 Guest are viewing this topic.

Offline Mad Axeman

  • Newbie
  • Posts: 74
    • View Profile
    • My web site - Harrythetrout
Creating PDF files
« on: November 12, 2019, 02:19:14 pm »
Hi Folks

Is there a simple way to create a PDF file with QB64? A nice add in library perhaps? Or even some commands that I haven't found yet? I'm guessing the answer is no but I just have to ask.
Oh look - a sig file :-)

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Creating PDF files
« Reply #1 on: November 12, 2019, 02:27:04 pm »
Probably possible with DECLARE LIBRARY and the countless pdf libraries or you could write your own PDF routines, depends how advanced are the pdf features you want. OPEN "x.pdf" FOR BINARY and go from there

The easiest way of making pdf reports that I can think of is generating html then using one of the various converter tools, some are command-line and can be integrated into your program with SHELL.

Offline Mad Axeman

  • Newbie
  • Posts: 74
    • View Profile
    • My web site - Harrythetrout
Re: Creating PDF files
« Reply #2 on: November 12, 2019, 03:01:26 pm »
The shelling to an external prog isn't suitable. The program I'm writing will be distributed to others and I don't want to have to go to the hassle of getting other peoples permission to distribute their programs with mine especially as only a small percentage of users will need the function. 
Oh look - a sig file :-)

Offline luke

  • Administrator
  • Seasoned Forum Regular
  • Posts: 324
    • View Profile
Re: Creating PDF files
« Reply #3 on: November 12, 2019, 08:42:33 pm »
My approach would be to generate HTML then pass it through https://wkhtmltopdf.org/ . It has a sufficiently free licence (LGPL) that you can just include it in your distribution and put appropriate attribution in the documenting.

Offline Mad Axeman

  • Newbie
  • Posts: 74
    • View Profile
    • My web site - Harrythetrout
Re: Creating PDF files
« Reply #4 on: November 13, 2019, 08:33:25 am »
I see they have a c library which may do what I want. I'll have to look into including c libraries into QB64. I can't use the online version as the util I'm writting can be used by people working out at places with possibly no net access.
Oh look - a sig file :-)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Creating PDF files
« Reply #5 on: November 17, 2019, 02:02:44 pm »
You might take a look at the small little program I did here, and see if it's basic enough to handle your needs: https://www.qb64.org/forum/index.php?topic=1858.msg111221#msg111221
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Mad Axeman

  • Newbie
  • Posts: 74
    • View Profile
    • My web site - Harrythetrout
Re: Creating PDF files
« Reply #6 on: November 18, 2019, 04:53:53 am »
Thanks. I'll take a look when I get back from work later today.
Oh look - a sig file :-)