Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Removing DRM protection from eBooks (http://stream-recorder.com/forum/forumdisplay.php?f=63)
-   -  

Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook reader

(http://stream-recorder.com/forum/showthread.php?t=8143)

WheezyE 01-05-2011 09:19 PM

Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook reader


 
Hi, just wondering if anyone's delt with one of these before.
Code:

http://www.vitalsource.com/software/vbk/
I've already done a google and forum search. Also, just as a potentially useless tidbit, using a hex editor on my .vbk file shows some ascii strings including JFIF (starting at address 6decimal) and AppleMark (starting at address 24decimal) :p :D :) k bye

WheezyE 01-05-2011 10:39 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
So it turns out that VitalSource books are printable. I captured the printer output with Adobe PDF "printer" (although there are several other programs out there for this -- including many free ones). However, my new PDF was in raster form and thus not searchable. I opened the PDF with ABBYY Fine Reader, did OCR, then saved a new PDF with ascii text underneath the raster pages. The original .vbk file was 13 megs. After tweaking with the output compression settings on ABBYY and saving a few drafts, I produced a PDF of what I consider identical quality (checked with zooming and I have a pretty good eye for colors and detail) for 15 megs.

Ta-da! :D

Apprentice Alf 01-13-2011 02:51 AM

Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook reader


 
The VitalSource Bookshelf software allows you to print your book, but only 5 pages at a time. On the surface this would seem to foil the print-to-PDF method, however using some AppleScript magic we can have their own software do all the work for us ;)

You will need a computer running MacOS in order to do this, however the resulting PDF will work on any computer. There are VMWare images of MacOS available online if you don't have a Mac. The AppleScript code below will dump the entire ebook out into a bunch of pdfs, each containing 5 pages each. We can then easily merge them together to create one DRM-free PDF containing all the pages.
  1. Open your ebook up in the VitalSource app.
  2. Load up AppleScript and paste in the following code:

    Code:

    set totalPages to 340
    set startPage to 0
    set authorName to "DMT"

    tell application "VitalSource Bookshelf"
            activate
            repeat with theIncrementValue from startPage to totalPages - 1 by 5
                    if (theIncrementValue = 0) then
                            set thisValue to "a"
                    else
                            set thisValue to theIncrementValue
                    end if
                    tell application "System Events" to keystroke "p" using command down
                    tell application "System Events" to keystroke thisValue as string
                    tell application "System Events" to keystroke tab
                    tell application "System Events" to keystroke theIncrementValue + 5 as string
                    tell application "System Events" to keystroke tab
                    tell application "System Events" to keystroke return
                    tell application "System Events" to keystroke return
                    tell application "System Events" to keystroke "p" using command down
                    tell application "System Events" to keystroke theIncrementValue as string
                    tell application "System Events" to keystroke tab
                    tell application "System Events" to keystroke tab
                    tell application "System Events" to keystroke authorName
                    tell application "System Events" to keystroke return
                    delay 7
            end repeat
    end tell

    Did you notice how we even took away the sides of our sexy ASCII art just so you would have hassle-free copy+paste?
  3. Change the totalPages to the number of pages, and authorName to whatever you want that field set to in the pdf.
  4. The delay of 7 seconds is quite conservative, this should do nicely for most people. If your computer is really fast then you can probably lower it a bit, but if the saving of any one pdf takes more than the delay then the script will break and you'll have to manually stop it. If this happens just set the startPage to the Next page you don't have. Pages are saved starting from 0 (page 0 is called "a" in the app, fuck knows why) and up in increments of 5, so you'll end up with 0.pdf, 5.pdf,10.pdf, etc etc. So if it breaks and you have to re-start it, the number you start it from will always be either 0 or a multiple of 5.
  5. So now you have your pdfs, time to join them together. If you want to do this on MacOS, install the textlive-context port with:
    Code:

    # port install texlive-context
    If you want to merge them on a ubuntu or debian linux box, then you want to do:
    Code:

    # apt-get install context
    Make sure all the pdfs are in one directory, then cd into that directory and type:
    # texexec --pdfarrange --result all.pdf `ls -1 *.pdf |sort -n`

This will get you a low quality .pdf file with a disclaimer at the top of every page.

sproey 10-11-2011 04:00 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
Hi,

Can anybody advise on .vbk files - i would like to convert to normal pdf files. This seems to be a tough version to convert, there are tutorials for Mac systems, but nothing for Windows. I understand i could install Cute pdf and print, but what if i wanted to remove the DRM?
I would like to make it so that they can be seen by other programmes and then printed off as a full pdf and not five pages at a time. Some of the books are 500 plus pages and would take a long time to individually modify the Cute pdf way, is there any other option?





Any help would be greatly appreciated.

Thanks

Rob

isildur 12-07-2011 11:56 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
I can print to pdf normally without using above script.

johnnyappleseed289 01-22-2012 05:53 AM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
I can print to pdf with a vengence!

I figured out a bitchen way to convert .vbk to .pdf

Go here!

http://dl.dropbox.com/u/58416017/VBK%20to%20PDF.docx

Download the file and follow the instructions.




JohnnyAppleseedBitches!

aaron4osu 08-15-2012 09:09 AM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
I tried the script and it didn't work. My version of vb only lets me print 2 pages at a time. Also the page number have an I or II in front of the page number. ex. I-24. When the script runs DMT shows up in the field where the beginning page number should be. Any suggestions? I understand a little bit of programming but have never used apple scripts before.

jman995x 04-09-2013 01:26 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
I can print everything I've selected in a .vbk file to a PDF, but there are page breaks (and text/pix are not justified above/below the break...if a picture on a seamless 33 page vbk file happens to fall across the page break of the newly printed PDF, the picture gets cut in half instead of placed above or below the page break).
Any way to fix this?
I'd love to just print the exact same seamless .vbk file into a duplicate seamless pdf file.
Any suggestions?

nabed4t 07-07-2015 03:52 AM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
Sorry to dig up an old thread, has anyone had any luck converting .vbk to .pdf using the script method suggested by Apprentice Alf?
I've tried it but I'm getting the same problem as aaron4osu.

Also has anyone tried johnnyappleseed289's suggestion? I had a look at it but it seemed dodgy, like virus dodgy. I noticed he has posted a lot of stuff re: vbk to pdf on various forums.

Cheers,
Dan

violetnight 07-07-2015 12:27 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
Hello,

I know this thread is a bit old, but I'm now frustratingly faced with a VBK textbook I need to print. I have tried the script, but for some reason I have to manually save to PDF each time it prints the next ten pages (my text allows 10 pages). I don't have a printer installed on my Mac, only the "save as PDF" option.

I have a screen shot of what I mean here:

https://lh3.googleusercontent.com/SX...w=w485-h371-no

I feel like I'm missing something here. Can anyone help me to figure out how to get the automated print thing to work? I would be eternally grateful!

daphnis 07-28-2015 04:54 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
1 Attachment(s)
I have created a macro on the Mac that will convert VBK to PDF. It uses the program Keyboard Maestro and was developed with version 7. VitalSource Bookshelf version 6.6 was also used to develop the workflow. All this was done on 10.10.4 (Yosemite).

The workflow will loop through a printing cycle and print the maximum number of pages that are allowed by that publication. There are several things that need to be specified manually, and those are in the color red. Those in orange may or may not need to be changed; it's up to you to test and find out.

The main thing to customize in addition to the steps in red or orange is the number of repeat cycles to run. The "Repeat Actions" step loops through the actions to print in blocks of X number. Determine how many times to repeat by <Total number of pages that are specified with integers> divided by <Max Number of pages to print in each run>. For example, if there are 180 pages that are numbered (doesn’t include pages that are numbered with Roman numerals), and you can print a maximum of 10 pages at a time, then set the Repeat action to 18 times. Note that if the number of pages isn’t even divisible, then repeat to the highest possible number, then you’ll have to manually print the excess both after this number, and before if the book uses Roman numerals.

I have used this to convert about 2,000 pages into PDFs, and I hope it helps someone else in the future.

violetnight 08-04-2015 05:23 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
Thanks, daphnis, I can't wait to try it!

xCake 11-14-2015 07:46 AM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
Quote:

Originally Posted by daphnis (Post 78555)
I have created a macro on the Mac that will convert VBK to PDF. It uses the program Keyboard Maestro and was developed with version 7. VitalSource Bookshelf version 6.6 was also used to develop the workflow. All this was done on 10.10.4 (Yosemite).

The workflow will loop through a printing cycle and print the maximum number of pages that are allowed by that publication. There are several things that need to be specified manually, and those are in the color red. Those in orange may or may not need to be changed; it's up to you to test and find out.

The main thing to customize in addition to the steps in red or orange is the number of repeat cycles to run. The "Repeat Actions" step loops through the actions to print in blocks of X number. Determine how many times to repeat by <Total number of pages that are specified with integers> divided by <Max Number of pages to print in each run>. For example, if there are 180 pages that are numbered (doesn’t include pages that are numbered with Roman numerals), and you can print a maximum of 10 pages at a time, then set the Repeat action to 18 times. Note that if the number of pages isn’t even divisible, then repeat to the highest possible number, then you’ll have to manually print the excess both after this number, and before if the book uses Roman numerals.

I have used this to convert about 2,000 pages into PDFs, and I hope it helps someone else in the future.


I tried using it, but it was just too confusing for me. I'm not very tech-savvy. Also, VitalSource caught on to this 'bypass' so they changed the maximum allowed number of pages to print to 2 pages.

Sigh... I just wanted to view the book on my Kobo e-reader... What a bunch of assholes.

jccalhoun 12-31-2015 12:54 PM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
I found someone's github with a method to directly convert the books to epub: https://github.com/GMMan/Extractor.epub
However, it doesn't work on the current version of the vitalsource software. To get it to work on Windows you need to uninstall the current version install the old version from their site that is indicated as being for XP and Vista: https://support.vitalsource.com/hc/e...wnload-Options (works fine on Win10)

Apparently it works through the vitalsource program allowing files to interact with each other so someone made up an epub that can extract the actual files from inside the vbk files. I successfully converted 4 out of the 5 books I tried. One wouldn't work but I'm not sure if it is my fault or not.

penguinman 01-02-2016 09:27 AM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
I have tried downloading the pub from github, but when I try to sideload it, it doesn't work.

thecurryface 03-06-2016 12:27 AM

Re: Remove DRM from the vitalbook .vbk format for converting ebook/reading w/ebook re


 
not working


All times are GMT -6. The time now is 09:29 AM.