Intro
Tired of manually cutting up pdfs and stitching them back together? Want an easier way to fix corrupted files in a book? Then look no further than this blog post! We got step by step instructions on getting those books flatter than pancakes on Sunday morning.

Requirements
Login into beagle or work dev environments (beagle login credentials listed below if you do not have one)
Login: Production
Password: Everett39
Either a Yearbook Id or a physical pdf that you wish to flatten
Steps
- Login to Beagle using your credentials
- Click on the search icon on the bottom bar of the windows screen. Search Command Prompt and select it.

3. Type
F:
into the command line and hit enter (or D: if it is work dev)

4. Type
cd MAIN/scripts/unit_tests
into the command line and hit enter (you may cd into each folder separately)

5. There are two ways to use the flattening script
Flattening a Yearbook Account
Type
cscript PrepBook.vbs “YBID” FLAT
Where YBID is the yearbook id of the book you wish to flatten without the quotation marks
Hit Enter
Flattening a PDF
Place the pdf you wish to flatten into
E:PREPPED_BOOKS
Type
cscript PrepBook.vbs “PDFName” FLAT-PDF
Hit Enter
6. The script will run for a while depending on the size of the book. When it is finished it will show up in the E:PREPPED_BOOK folder with the “_FLAT” attached to the file name

7. Finished!
Notes:
The YBID flattening takes the original pdf from the designer NOT 01ToPrint similar to the Transfer Prod Worker. If you need a specific version or just the 01ToPrint version use the PDF version
Currently the default flattening DPI is 450
This will work on any device IF it has an E drive with a PREPPED_BOOKS folder. There is no other reason why it cannot run locally