!WARNING: Contains nothing but spoilers
The movie is itself the movie within the movie. This is the final fact which drives Trent insane at the end. But what does that mean?
The movie has a number of notable breaking the fourth wall sequences, most well known of which is probably the "my favorite colour is blue" bit.
But these are scattered throughout the movie. In the scene where Trent attempts to warn the publisher about the manuscript he is told of time skipping and actions he has done during the time skip, that he has no awareness of. His awareness then, is confined to the periods when we see him, he doesn't exist as a person when the camera isn't on him.
The film is not about fiction crossing over into reality, it's about someone realising that their reality is a fiction.
The film is the film within the film. It is an adaption of the book. Therefore the film that we have watched is the book that Sutter Cane sold. The book is a tale of a writer who creates a world and interacts with the characters within.
Imagine writing as a process of creating a world and filling it with people. Imagine the world was effectively real to the characters within it, characters who are thinking, feeling people who believe they have existed since their birth, not since the beginning of the novel.
Go to the earliest chronological point in the film, Trent's establishing character scene. This is the first part of this world to ever exist. But it comes into existence as if it has always existed.
Sutter Cane, and his books, were written into this world, presumably by the real Sutter Cane (perhaps a stand in for Michael De Luca) but in this world, his books are insanely popular, more read than the bible and they have the power to drive people insane. (a pretty impressive claim for a horror writer)
As Trent progresses through in the mouth of madness, he becomes aware that Cane has the power to warp reality, but that's not what's actually happening. Reality is being warped by the writer (a force external to the story itself) warping it. These actions are associated with his stand in.
Cane tries to show him this, to show him how easily the world is manipulated to bring him to the revelation that will drive him mad. First though, Trent must deliver the book.
As the book is published people are driven mad by it. But what specifically drives them mad? The film never says. But at the end, when Trent goes into the cinema and sees the movie he has the revelation that the film he's watching is the events that have just played out. Remember he's still not read the book. But seeing the film, seeing the actions that led him here all written out, long before they played out show's him what he truly is.
He is fictional. The world is fictional and indeed, about to end, not with insanity or Cthulhu esque abominations but instead, it will cut to credits and the world will be gone.
Trent, and everyone else who read the book, was driven mad by the fundamental knowledge that he did not exist, that he was only a fictional character in the mind of a writer.