VitalSourcePrinter icon indicating copy to clipboard operation
VitalSourcePrinter copied to clipboard

Not a Valid Page Number

Open Zelys-DFKH opened this issue 8 years ago • 11 comments
trafficstars

There seems to be some effort from the publisher to prevent use of this app: In a single chapter, if I try to use the script to print, say, pages 60-70, with a limit of 2 at a time, it will get stuck on page 64, with an error of "64 is not a valid page number for this chapter." I've triple-verified that I'm in that chapter, viewing that page. When I try to print it manually, the same error exists. However, even through there is a 2-page limit, it will allow printing 63-65 (3 pages), skipping that troublesome 64, and it does actually print the 64 in the middle. They have done this to various pages throughout the book, apparently to make printing even more difficult. Is there any workaround?

Zelys-DFKH avatar Mar 29 '17 15:03 Zelys-DFKH

Seems a bit odd, but if there's a way to decipher their logic there should be a workaround. So even though page 64 was indeed inside the chapter you were viewing, VitalSource deemed it as not being a valid page for that chapter? I'm also unclear on when/how printing 3 pages at a time becomes enabled. Can you elaborate more?

LifeAlgorithm avatar Mar 30 '17 05:03 LifeAlgorithm

Hi. Thanks for the quick response.

Yes, it was considered an invalid page, although it was an entirely regular page while viewing the chapter. When I try to print page 64 & 65, there is the invalid page error; the same with pages 65 & 66; because page 65 is invalid. However, if I input 64 to 66, it would accept it without an error, and the printout shows pages 64, 65, and 66. This happens in random places in each chapter.

When the script breaks, it writes the filename “File2” in the page# cell in the print dialog.

What do you think?

Best Regards,

Gabriel

From: LifeAlgorithm [mailto:[email protected]] Sent: Thursday, March 30, 2017 8:00 AM To: LifeAlgorithm/VitalSourcePrinter [email protected] Cc: zabytu [email protected]; Author [email protected] Subject: [!! SPAM] Re: [LifeAlgorithm/VitalSourcePrinter] Not a Valid Page Number (#5)

Seems a bit odd, but if there's a way to decipher their logic there should be a workaround. So even though page 64 was indeed inside the chapter you were viewing, VitalSource deemed it as not being a valid page for that chapter? I'm also unclear on when/how printing 3 pages at a time becomes enabled. Can you elaborate more?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LifeAlgorithm/VitalSourcePrinter/issues/5#issuecomment-290302828 , or mute the thread https://github.com/notifications/unsubscribe-auth/ARLK6bDLUN8_uG4uJzkGkpUjoWWuoPBxks5rqzbagaJpZM4MtMM- .

Zelys-DFKH avatar Mar 30 '17 07:03 Zelys-DFKH

Is three page printing always enabled? Because according to what you said, it looks to be fixing the problem.

LifeAlgorithm avatar Mar 31 '17 01:03 LifeAlgorithm

Is it possible you are on a mac? I had the same problem and after a little troubleshooting found that the hotkey was the issue.

For it to work on my end, I had to replace all mentions of "ctrl" with "command", as the hotkey on Mac is different.

Maybe it would make sense to create a second version for Mac where this is already done?

bek8 avatar Jul 15 '17 20:07 bek8

That's a great solution for Mac users. Feel free to send a pull request with a mac version. I'll check back later and add a version myself if you don't want to.

LifeAlgorithm avatar Jul 18 '17 17:07 LifeAlgorithm

I'm not a developer. My husband helped me. He's happy to create a pull request later this week, if you like.

bek8 avatar Jul 18 '17 18:07 bek8

Yes, that would be cool.

LifeAlgorithm avatar Jul 19 '17 19:07 LifeAlgorithm

Unfortunately, this seems a little more complicated. Replacing ctrl with command helps with the biggest issue, but since there is no default PDF printer for Mac, the next issue isn't far afterwards. When you try to create a Mac version, you'll need to decide on a PDF printer.

This one seems to be an option: https://github.com/rodyager/RWTS-PDFwriter

If you can't figure it out, my husband says he can have a look when he is less busy. In any case, I hope this helps.

bek8 avatar Jul 26 '17 16:07 bek8

Good Day

I have received the following errors , please assist me in this regard.

When the VitalSource Bookshelf - Print Preview popup, it automatically type in the FROM... the following messages staring with eBook and then again File 2.. see attached

screen

Please assist me thanks

Bradley1986 avatar Jan 24 '18 17:01 Bradley1986

The problem might be here, as indicated with a 👍 , ....

if not(RomanStart == 'No' or RomanStart == 'no'):  #if user typed in roman numerals
    PageEntry1 = RomanBookList[0]
    PageEntry2 = RomanBookList[1]
                        
    pyautogui.hotkey('ctrl', 'p')
    pyautogui.press(keys = 'tab', presses = 2, interval = 0.25)
    pyautogui.press('delete', 5)
    pyautogui.typewrite(PageEntry1)
    pyautogui.press('tab')
    pyautogui.press('delete', 5)
    pyautogui.typewrite(PageEntry2)
    pyautogui.typewrite(['tab', 'tab', 'enter', 'enter'], interval = 0.25 )
    pyautogui.typewrite(" 👍 Ebook" , interval = 0.50)
    pyautogui.press('enter', interval = 0.5)
    time.sleep(0.25)

    print("Page: " + '1' + ' of ' + str(len(RomanBookList) ))
    for page in range(2, len(RomanBookList), 2):
            pyautogui.hotkey('ctrl', 'p', interval = 0.25)
            pyautogui.press('tab', 2, interval = 0.25)
            pyautogui.press('delete', 6, interval = 0.25)
            pyautogui.typewrite(RomanBookList[page], interval = 0.25)
            pyautogui.press('tab', interval = 0.25)
            pyautogui.press('delete', 6, interval = 0.25)
            pyautogui.typewrite(RomanBookList[page + 1])
            pyautogui.typewrite(['tab', 'tab', 'enter', 'enter'], interval = 0.75)
            pyautogui.typewrite(" 👍  File2" , interval = 0.5)
            pyautogui.press('enter', interval = 0.5)

Hope this will help

Bradley1986 avatar Jan 24 '18 21:01 Bradley1986

Please uploaded the Update VitalSourcePrinter_PageDown.py that u are using in the video

Bradley1986 avatar Jan 24 '18 21:01 Bradley1986