I managed to rotate individual pages in a document, but I can't get any means of refreshing the page to work. I have to re-navigate to the page to see the effect of the rotation. Not the ideal scenario for our users.
MyPDFView code:
public void RotatePage(int page)
{
Page.Rotate originalRotation = m_PdfDocument.GetPage(page).GetRotation();
Page.Rotate rotation;
switch (originalRotation)
{
case Page.Rotate.e_0: rotation = Page.Rotate.e_90; break;
case Page.Rotate.e_90: rotation = Page.Rotate.e_180; break;
case Page.Rotate.e_180: rotation = Page.Rotate.e_270; break;
case Page.Rotate.e_270: rotation = Page.Rotate.e_0; break;
default: rotation = Page.Rotate.e_0; break;
}
m_PdfDocument.GetPage(page).SetRotation(rotation);
}
frmMain code:
private void btnTurnView_ItemClick(object sender, ItemClickEventArgs e)
{
if (CurrentForm != null)
{
CurrentForm.p_m_oPDFViewCtrl.RotatePage(CurrentForm.p_m_oPDFViewCtrl.p_PageInfo.p_PageNumber);
}
}
Things I have tried so far: Invalidate(), Refresh(), Update() on different parts of the document/view. I could run a page analysis (similar to what happens on a page change) which probably fixes the issue, but brings unnecessary overhead, if there's a more efficient means, I would prefer relying on that instead.