-2

I have used TBS (TinyButStrong) for several PHP projects to generate DOCX or XLSX files based on a template.

I am now trying to popular a DOCX template with TBS and generate a PDF at the of the process. It this possible with TBS? It doesnt seem like it supports PDF but not sure if someone has found a plugin to help.

Thank you!

VVN
  • 1,607
  • 2
  • 16
  • 25
AAA
  • 2,388
  • 9
  • 32
  • 47

1 Answers1

0

You can use tbs to generate docx or odt (better) and then convert to pdf using unoconv

unoconv can run either as a service or as cli

The conversion from docx do not believe can be done directly; you could convert to an intermediate format, such as .doc. In this I have no direct experience.

Using odt you would not have problems ... and you would have a pdf very close if not equal to that generated odt

Granduca
  • 9
  • 4
  • Thank you - do you know if there is anything like this for Windows? – AAA Jan 13 '17 at 19:49
  • no, I'm sorry. you can still use Libreoffice directly from the command line. After generating the odt files, you can create PDF by launching a simple shell command. The parameters can be found here https://help.libreoffice.org/Common/Starting_the_Software_With_Parameters. – Granduca Jan 16 '17 at 12:56