Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

FIT To SCreen

More
IP: 192.168.0.70 12 years 6 months ago #3942 by arcmobile.div
FIT To SCreen was created by arcmobile.div
Hi,

Currently when we are rendering the first page of PDF in the screen using your PDFViewer , we are unable to render the entire page on
the screen of the device rather the full page is viewed only on scrolling mode.

We need to implement the Fit to screen for the first page of the PDF so that the entire page is visible on the screen without scrolling.
More
IP: 192.168.0.70 12 years 6 months ago #3943 by arcmobile.div
Replied by arcmobile.div on topic FIT To SCreen
Any updates ?
More
IP: 192.168.0.70 12 years 6 months ago #3944 by claudeh
Replied by claudeh on topic FIT To SCreen
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
More
IP: 192.168.0.70 12 years 6 months ago #3945 by arcmobile.div
Replied by arcmobile.div on topic FIT To SCreen
Hi,
This method exist in this package com.radaee.pdfex. But we are using package com.radaee.view where PDFViewVert call exist. So if we copy the class and paste there any problem is there.
Let us know because same class exist in two package but different code. we are using 2.9.2.

Thanks.
More
IP: 192.168.0.70 12 years 6 months ago #3946 by arcmobile.div
Replied by arcmobile.div on topic FIT To SCreen
Hi,

Can we show the pdf in center of the screen. Suppose if your height fit then the view load from left side right side's some portion blank. So can we show center of the screen.

Thanks & Regards
More
IP: 192.168.0.70 12 years 6 months ago #3947 by arcmobile.div
Replied by arcmobile.div on topic FIT To SCreen
Hi,

Any update on this!!!
Time to create page: 0.412 seconds
Powered by Kunena Forum