1

I'm building a website where people can pick several pictures from a range.

I then want the users to be able to create a PDF using those pictures. However I want those pictures inserted in predefined positions and sizes in a template I have already created which will contain other predone materials (words pictures etc).

So my question :

  1. its possible ?
  2. Can anyone recommend a library which will satisfy my needs, I have had a look and I cant see any PDF libraries that seem to mention templates

Any guidance on where to start will be greatly appreciated.

Daniel Larsson
  • 527
  • 2
  • 6
  • 23
user2445278
  • 808
  • 1
  • 8
  • 15
  • 1
    https://stackoverflow.com/questions/42057799/how-to-download-a-png-canvas-image-as-pdf-jquery – Hari_pb Oct 29 '18 at 19:59

2 Answers2

1

Yes, this is completely possible.

I would recommend using wkhtmltopdf to generate the pdfs from an html template.

Another handy library for this kind of work is image.intervention

Both of these would work with PHP.

If you're working in javaScript you may want to use PDFKit

admcfajn
  • 2,013
  • 3
  • 24
  • 32
1

Edited: Only if you use php.

There are several libraries you can use to generate a pdf depending on what template you will build your pdf. I hardly recommend TCPDF. You can use html to layout the design you want or you can embed the image directly on a page. See an example here.

Erlisar Vasquez
  • 460
  • 3
  • 13