Hi
The classes in charge to display a page apply systematically a fit width.
If you want apply a fit height, you have to modify few lines code.
For instance, if you use the PDFViewVert you have to modify the method : vert_set_ratio
private void vert_set_ratio()
{
if( m_doc == null ) return;
float max_w = m_doc.GetPageWidth(0);
float max_h = m_doc.GetPageHeight(0);
int page = 1;
int pages_cnt = m_doc.GetPageCount();
while( page < pages_cnt )
{
float w = m_doc.GetPageWidth(page);
float h = m_doc.GetPageHeight(page);
if( max_w < w ) max_w = w;
if( max_h < h ) max_h = h;
page++;
}
if(fitWidth)
ratio_min = (m_win_cx - m_page_gap) / max_w; // Default behavior
else { // added lines.....
// **To get a fit height
ratio_min = (m_win_cx - m_page_gap) / max_w;
float ratio_min2=(m_win_cy - m_page_gap) / max_h;
ratio_min=Math.min(ratio_min, ratio_min2);
}
Hope that will help