I am trying to render all elements on the PDF regardless of whether they are on the page or not.
I have tried passing a Rect* clipRect into the Resterize function, and also tried setting the e_crop to the size of all elements on the page,
but the effect is the same.
When I rasterize I always just get the content the is within the m_page->GetPageWidth() & m_page->GetPageHeight();
My call is as follows:
Rasterize( *m_page, (pdftron::UChar*)byteArray.data(), width, height, stride, bytes_per_pixel, true, mtx, clipRect );
The ClipRect will still be subordinate to
the actual crop box of the page, and the media box. Try the following to expose all graphical content on a page.
Rect rect(-7200, -7200, 7200, 7200); // max pdf page dimension page.SetCropBox(rect); page.SetMediaBox(rect); rect = page.GetVisibleContentBox(); page.SetMediaBox(rect); page.SetCropBox(rect);
The page will now display all graphical content. If you want to restore the page to its original state, simply backup the original