-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
The dispose method in the from_html plugin does two things. First, you pop the graphics stack operator pushed in the init method (the Q in dispose pops the q in init). Second, you return an object with the current x/y positions.
The problem is that dispose is called multiple times in the process method, once by the return and the other just above it inside the 'checkForFooter.call' function via callback(r.dispose())
.
You either need to not use the dispose method to get the current position for the callback, or protect the write("Q")
call so it only fires once. Feedback on the intent would be nice.
As far as I can tell this breaks the graphics stack for all calls to fromHtml. The Chrome and FF viewers handle the bogus pdf gracefully, but adobe reader does not. Any additional elements on the same page simply do not render. Any pdf validator (such as http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx) will also catch the stack error.