I wanted to create a project that is able to take multiple .pdf files and then be able to split them up by page and merge them again. I.E Is their a way in love to combine/rearrange multiple .pdf files (I would assume with the help of 3rd party modules and things).
I realize this is a bizarre thing to try and achieve in a game engine, but I've taken to using love for all of my personal projects. Recently I've been manually combining .pdf files to create mash ups of past exam papers for my school science revision, and I thought it would be fun to try and find a way of automatically generating 'random papers'.
I hope I've been clear, If not yell at me and I'll try to elaborate for you!
Thanks in advance!
Merging pdf files
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Merging pdf files
Lua can do a lot of things and there any many modules.
Search on Google for "Lua PDF bindings":
http://luahpdf.colloquiki.com/
Rendering the PDFs through Love would be much harder though.
Search on Google for "Lua PDF bindings":
http://luahpdf.colloquiki.com/
Rendering the PDFs through Love would be much harder though.
Re: Merging pdf files
Thanks for replying!
I've seen luahpdf in my search on google, but I couldn't figure out how to use it within love2d. Is there a way? I also remember having difficulty finding a lua binding for specifically merging and spiting pdfs, luahpdf only generates new ones, but I'll carry on looking for one.
Thanks again for your help!
EDIT: I haven't actually been able to find any other lua libraries for PDF manipulation. I have found a C++ one that does quite a few cool things (podofo.sourceforge.net), but I'd imagine that that is even more complicated to incorporate into love!
I've seen luahpdf in my search on google, but I couldn't figure out how to use it within love2d. Is there a way? I also remember having difficulty finding a lua binding for specifically merging and spiting pdfs, luahpdf only generates new ones, but I'll carry on looking for one.
Thanks again for your help!
EDIT: I haven't actually been able to find any other lua libraries for PDF manipulation. I have found a C++ one that does quite a few cool things (podofo.sourceforge.net), but I'd imagine that that is even more complicated to incorporate into love!
Re: Merging pdf files
If you're trying to parse pdf files - what you could do is
use an existing "converter" to turn the files into a manageable format like RTF or TXT.
These would be trivial to handle from Lua.
use an existing "converter" to turn the files into a manageable format like RTF or TXT.
These would be trivial to handle from Lua.
Re: Merging pdf files
Great idea! I went to pdftotext.com to experiment with it, and obviously turning a pdf to txt back to pdf stripped it all of it's formatting, but I also found pdf2png.com which with love will work a charm!ivan wrote:If you're trying to parse pdf files - what you could do is
use an existing "converter" to turn the files into a manageable format like RTF or TXT.
These would be trivial to handle from Lua.
Many thanks for your help! It's great to be able to get such a useful response from clever people!
To derp, or not to derp?
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], slime and 1 guest