Minecraft wiki entry for Written_Book, associated text: When written books are obtained with commands (without the correct data tag), the label shows "Written Book" and has the text "*Invalid book tag*" when opened. The book is signed and cannot be edited without commands.
Commands that were added to a written book using serialized JSON objects are executed through the chat system. This means that any command added to a written book can't be longer than 256 characters, which is the maximum chat line limit.
During the 2020 April Fools Update Java Edition 20w14∞, throwing a written book into a lit nether portal would create a portal to one of the 2,147,483,645 new dimensions.