How to make folded book art easier using your computer

Picture of How to make folded book art easier using your computer
In various places, I saw those beautiful folded book art pieces (like in these instructables: Book-Art-How-to-Fold-a-Book-into-a-Word, Folded-Book-Art-Best-most-clear-Tutorial-available  ) - and as I am an avid reader and love books, paper and art, this was a wonderfully alluring combination!

So, I absolutely wanted to make my own! And of course I also wanted to use my own pattern, not just anything!

Looking into one of the instructables (How-to-Fold-a-Book-into-a-Word-The-original-tuto ), which describes the process of making your own pattern, I saw that the measuring and mapping from picture to page is a really tedious, time-consuming process, which can also go wrong in many places. And I realized that the number of free ready-to-fold patterns is a bit, .... mmmh, limited - you don't always want hearts...unless it's Valentine's day, of course.

As I'm also learning how to program, and am a fan of open source software, I thought I could combine this with the books to create something useful.

So I wrote a program which can turn your picture into a pattern for making book folding art.

This instructable is not about how to write that program, nor will I explain in detail how it works.

This instructable shows you how to use the program to make your own book art with your own pattern.

WARNING: The program was only tested on Linux. I do not know, nor can I test, if it also runs on a Windows or Mac OS operating system. If you find out if / how it works on those other, non-open source operating systems, please provide a hint in the comments for other users!

Update: Instructables user flogy4031 and I got it to work on Windows 7. flogy installed WAMP (from, a server environment for Windows, which did some of the configuration of php for him, and imagemagick. Then flogy still had to do some configuration to make the command line work (see linked videos in the comment section). I have now added a Windows version of the script to the github repository, which eliminates a problem caused by different behaviour of the Windows command line.
Thank you very much, flogy4031!

Update 2: As the configuration of php and imagemagick seems quite difficult on Windows for the non-geeks, I added the option to use a virtual machine (which is a little computer inside you computer, if you will). I think this is much easier for the Windows users, and it will also work on Mac OS/X. However, the download size is bigger. Go straight to option 2, if you prefer this!
Remove these adsRemove these ads by Signing Up
flogy4031 made it!1 month ago

finally, after one night folding I've done it!

Overall, it has been a great and fun learning experience, and as a bonus the outcome is outstandingly beautiful (.. is my second ever book folding, so my technique still has to be improved therefor the folds are not quite exact :-) )

2014-03-03 22.19.22.jpg2014-03-03 22.20.12.jpg2014-03-03 22.18.45.jpg

How many "sheets" are in the book you used? That looks great!

Thank you !!

319 sheets (638 pages - 2 hours marking, about 3 hours folding)

I used only 297 sheets :-)

Hope to see yours soon ;-)

This is my second one using the script. This turned out much better because it was a book with more pages. I made this to remember our puppy who just passed away.


Sweet!! keep up the good work!

Moini (author)  flogy40311 month ago

This looks very, very good! Congrats and thank you for sharing!

Raphango1 month ago


Definetely gotta have one myself! =D

What a beautiful blend of technology and art. Thank you so much for sharing :)

jmc752 months ago

Very nice. Your software eliminates the one part of this process I would dread to do. Next flea market I hit I'm going to try to pick up a couple books to give this a try. Going to try to make my daughter a Hello Kitty book.

Moini (author)  jmc752 months ago

Don't forget to post a picture when you're done :-) - a Hello Kitty silhouette will work fine. Eyes and nose are so small - I don't know if they will come out well.

ckerr510 days ago
For some reason it wasn't working but I got it to start installing. Near the end it gave me a message and with either option I chose it wouldn't download and work. Is there any other program or way to do this?
14, 4:26 PM.jpg
Moini (author)  ckerr59 days ago

You don't REALLY still use Windows XP ?.... You know that this is no longer supported?

As far as I could google that for you, usually nothing happens if you
proceed with the installation. It seems to be a matter of payment to
Microsoft by the firm producing the software to get the software
certified, which would result in no warning being displayed. But who knows. I cannot guarantee that this is true.

You can also use vmplayer, if you prefer.

Download link:


ckerr511 days ago
I got the 7zip working and finished that, but now what file do I use from the ones downloaded with the virtual box? Most files I've tried to open ask me what I want to use to open them with so I need to know that too. Thanks for your help!
Moini (author)  ckerr510 days ago

To quote from the instructable:

"Then, open VirtualBox and click on File → Import appliance. Choose the OVF file you have just extracted with "Choose". It will then be imported, this can take a while."

I think this should answer your question.

Please don't forget to install VirtualBox first, so you can open the OVF file with it.

ckerr516 days ago
So I'm not tech savvy like others and cannot figure out how to get past (for windows) the installation process. I don't know how to use the 7zip software. Any help would be appreciated!
Moini (author)  ckerr514 days ago

Just open the 7zip program, choose the file with the virtual machine you just downloaded and click on 'extract'. It's really that easy!

DTwemlow911 month ago

I answered all the questions but now I'm having trouble accessing the 3 files which were generated. I don't see them anywhere in the system, please help!

Moini (author)  DTwemlow911 month ago
Hi DTwemlow91,

I think you used the VirtualMachine. If I am right, please do this:

1. Open the Terminal Emulator (Click on the little black box at the bottom of the desktop)

2. Type: su
Hit enter

3. Type: test
Hit enter (you just logged in as root)

4. Type: apt-get update
Wait a bit. You need an internet connection for this.
(You are looking for an index of the currently available software)

5. Type: apt-get install php5-gd
Wait a bit.
(You install the missing module)

6. Close the terminal.

7. Use the script.

I am going to update the Virtual Machine as soon as possible. Until then, everyone will have to install gd manually.

So sorry - I was so eager creating this that I forgot testing the VM. Shame on me...

If you are on another system, you will have to install or activate the gd module without a step-by-step from my side.

I very much appreciate how informed and helpful you are :]

I was able to install the missing module. However, when I enter the file name into TheBookArtGenerator it's now giving me an error message "Couldn't open file!"

It's even failing to open the pre-existing files in the script such as "cat.png" and "ping.png"

If you could inform me of any possible solutions I'd appreciate it! Again, thank you for your help.

Moini (author)  DTwemlow911 month ago

There seems to be a problem with the desktop launcher (the heart icon), I'm going to improve on that. Seems I will have to add a script for the launcher to work properly...

Meanwhile, you can start the script by opening the terminal (black box at the bottom of desktop) again.

Then type

cd /home/bookartist/Desktop/MyBookArt


php BookArtGenerator.php


SUCCESS! Thank you so much and I voted for this instructable in the Paper Craft Contest :D

Now I only have one question for you. In the script of the BookArtGenerator it says "number of the first even page of your book"

when providing this information are we supposed to account for the pages which aren't marked? For instance, the first even marked page in my book is of course labeled 2 but with copyright pages, acknowledgments, contents and such it's in fact page 20. So then should my answer be 20?

Moini (author)  DTwemlow911 month ago

Thank you, too ;-)

The numbers the pattern shows are supposed to be the numbers printed on the pages. So the first even page would be the 2, then. The program can't know how many pages there are before the actual counting starts ;-). I made this so that it is easy to follow the pattern and to enter the values. Usually, there is not so much front matter in a book, and the few unfolded pages at the start don't make it look bad.

However, if it is important for you that the first 20 pages are taken into account, too, you can deduct 20 from each number shown in the pattern and add 20 to the last even page you tell the program to get the correct total page number.

In numbers:

- program asks for first even page: say 2 (if it is 2)

- program asks for last even page: say 20 + last even page number

- when folding, make it pattern page number -20 for every page.

I wish you gave my tuto link ( as I am the one who create the original technic to make folded book !!

Moini (author)  Faitmain-Faitcoeur1 month ago

It's already in it from the beginning! Look into STEP 1 :-)

Moini (author)  Moini1 month ago

I meant the intro, of course, Step 1 is the next step.

No in fact ! You gave Teferrell & Magistro links !! ;-)

They used my technic which asked me many hours and tries...

Moini (author)  Faitmain-Faitcoeur1 month ago

Please take a look into the third paragraph of this instructable.


"Looking into one of the instructables (How-to-Fold-a-Book-into-a-Word-The-original-tuto ), which describes the process of making your own pattern,..."

Isn't this yours?

Gosh, shame on me...

Yes, free patterns are very limited and many people make money with my tuto.
But it doesn't excuse me for my mistake, sorry again !

tivie11 made it!1 month ago

I completed my wife's name of Michele in a day also. The longer the picture or word, the more pages needs to be in the book. I think I don't have enough resolution to clearly show the letters. My book used approximately 174 "sheets". Probably double that would be good. Thicker paper may also help, so look for that when choosing a book to fold. I plan on making more for gifts for family and friends in my spare time. Thank you Moini!

Moini (author)  tivie111 month ago

Thanks for sharing! And keep on going - seems you've got a long time of folding in front of you ;-) I think your gifts will be very much appreciated!

tivie111 month ago

After learning how to installl php on Windows 7 and getting the script to run, I am at a snag. I've entered the page numbers and book height successfully, but when I enter the image name, the script quits and puts me at the command line. it doesn't go into the overview of entered data, just back to my folder path. i know flogy4031 said it takes a while to run the script, but I didn't get that far. Am I doing something wrong? I am using an image I had converted at an online image conversion site to .png

tivie11 tivie111 month ago

I've successfully converted an image from .jpg to .png now using ImageMagick through the command line, but still no luck getting past the image input of your script.

Moini (author)  tivie111 month ago

Could you append the converted image? What is the last thing you see printed? Any error messages?

I suspect it may have to do with either the filename (1) or with the color mode (2) of the image. It seems the program can't open (or close) the image and dies trying.

Or maybe (less probably for what you described) the problem lies in the call to imagemagick (3) from the script - but with that, I won't be able to help you, this must be some configuration option for php commandline scripts on Windows, where I have no option to check / test it. Let's try to clear up the first two things first.

About no. 1: Did you check the mode of the image in an image software (like gimp)? Is it RGB? Does it contain transparency?

About no. 2: Does the file name contain any 'strange' characters? Are there spaces in the filename? Is the file in the directory where the script is?

Do you dare to do some debugging and editing the script? I could tell you what to write into which line to see what happens - but first make sure the picture is in the correct format and its name is valid.

About the script speed: Even with large images and books, it only takes a few seconds to run (at least on my old slow computer). I think what flogy meant was the time it took to install and get to work the php and imagemagick.

tivie11 Moini1 month ago

I just checked the image and it was in grayscale, so I converted it to RGB mode in GIMP 2. The same thing happened. I got all the way to selecting the file, which is in the same folder as the BookArtGenerator.php script, and it kicks me to the command line prompt. I've just now changed the name of the file to "A.png" to see if your second suspicion is the cause, and I get to the same point again. I've checked in imageMagick if there is a transparency layer and it says False.

Last night I was finally able to get imageMagick to convert through the command line. Does imageMagick need to be installed in the same folder as your script? Now it is in it's own installation folder.

I can do some copy and pasting into the script if you tell me exactly what to do. I've never taken any programming classes, so this would be new to me.

Moini (author)  tivie111 month ago

@tivie: Please look into the script and remove the @ in line 111 (It's the only @ in the whole script). It is meant to suppress error messages, but right now, we want to know what the error is.

What does the output show now?

Moini (author)  Moini1 month ago

@tivie: Afterwards, try this:

in line 154, replace the contents by

$imageMagickCommand = "convert \"$filename\" -resize ".$numPages."x".$imageheight."\! -threshold 50% tempfile.png";

On the imagemagick homepage I have read that convert needs double quotes around the file names on Windows.

About the imagemagick folder: You did (hopefully) not just copy/unpack the zip-file-imagemagick, but did a real installation from one of the exe-files? (see this page:

Moini (author)  Moini1 month ago

@tivie: I just learned that imagemagick needs to be treated differently on Windows. Your line 154 should be

$imageMagickCommand = "convert \"$filename\" -resize ".$numPages."x".$imageheight."! -threshold 50% tempfile.png";

or, if this doesn't work, try

$imageMagickCommand = "convert $filename -resize ".$numPages."x".$imageheight."! -threshold 50% tempfile.png";

What's your result now?

tivie11 Moini1 month ago

I removed the @ in line 111. I did find another @ further down, but I don't know what the line number is. I removed it also, just in case. I ran the script and it gave me an error: PHP Fatal error: Call to undefined function ImageCreateFromPNG() in C:\Bookart\BookArtGenerator.php on line 111

I then changed line 154 and tried both different instructions. Neither of those worked. I then added the @ back to line 111 with the different lines 154 and it goes back to the prompt like in my original post.

I did do the proper installation of ImageMagick, not just extract it to a folder.
That shouldn't be a problem. As I said before, I was able to successfully convert using the command line in ImageMagick

Moini (author)  tivie111 month ago

Good :-D

A websearch told me that php image functions need a library called GD. It seems, that usually it is included since php version 4.3 (You should have 5.5 at least!) - so I assumed that everyone who has php, also has GD.

On info how to get GD, please see here:

You will also need the png-thingy for GD linked in the table on that page.

tivie11 Moini1 month ago

I installed php 5.5.9 from, so the GD library should be installed already.

I have now just tried your updated Windows script from your github repository and it gives me an error on line 34: Parse error: syntax error, unexpected 'getParametersFrom User' (T_STRING), expecting '(' in C:\BookArt\BookArtGenerator.php

Any ideas?


Get More Out of Instructables

Already have an Account?


PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!