Question:
Here is the error I get
`
Message: bad allocation
Inner exception:
Stack trace: at pdftron.PDF.PDFViewWPF.CreateTile(SByte* buffer, Int32 originX, Int32 originY, Int32 w, Int32 h, Int32 canvasNumber, Int64 cellNumber, Boolean finalRender, Boolean predictedRender, Int32 tiles_remaining, Boolean first_tile, Int32 canvas_width, Int32 canvas_height, Int32 cell_side_length, Int32 cell_per_row, Int32 cell_per_col, Int32 thumb_nail_id, Boolean swap_bytes, Int32 sequenceNumber)
at pdftron.PDF.detail.CreateTile(Void* data, SByte* buffer, Int32 originX, Int32 originY, Int32 w, Int32 h, Int32 canvasNumber, Int64 cellNumber, Boolean finalRender, Boolean predictedRender, Int32 tiles_remaining, Boolean first_tile, Int32 canvas_width, Int32 canvas_height, Int32 cell_side_length, Int32 cell_per_row, Int32 cell_per_col, Int32 thumb_nail_id, Boolean swap_bytes)
`
How do I handle this?
Answer:
You need to use the following two functions to activate and deactivate your PDFViewWPF instances. Ideally just one is Active at any given time, to minimize memory usage.
PDFViewWPF.Deactivate()
PDFViewWPF.Activate()