Blue Pages - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
  • Page:
  • 1

TOPIC: Blue Pages

Blue Pages 2 years 6 months ago #10643

  • josalo
  • josalo's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
HI, Im using the demo SDK and considering buying it. I implemented PDFViewPager sucessfully in my android app but i can only see the first page. The rest are in blue. Is this a limitation of the demo version?

Thanks

Please Log in or Create an account to join the conversation.

Blue Pages 2 years 6 months ago #10644

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
I suspect it could be an issue related to your code or to the pdf you are working with.
May you upload the file so we could check it?

Please Log in or Create an account to join the conversation.

Blue Pages 2 years 6 months ago #10645

  • josalo
  • josalo's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Im trying to make it work as an React Native UI Module. It happens to me with several PDFs, im attaching you one of them. Page 3 renders blue.

dl.dropboxusercontent.com/u/2515162/GPA-...aginitis-2016-OK.pdf

Here is my code:
public class PdfViewManager extends SimpleViewManager<RelativeLayout> {

    public static final String REACT_CLASS = "RCTRadaeePDF";
    private ThemedReactContext context;
    private Document m_doc;
    private PDFFileStream m_stream;
    private RelativeLayout m_layout;
    private PDFViewPager m_pager;

    public PdfViewManager(Activity mActivity) {
        Global.Init(mActivity);
        Global.debug_mode = false;
    }

    @Override
    public String getName() {
        return REACT_CLASS;
    }
    @Override
    public RelativeLayout createViewInstance(ThemedReactContext context) {
        m_layout = (RelativeLayout) LayoutInflater.from(context).inflate(com.radaee.viewlib.R.layout.pdf_fragment, null);
        m_pager = (PDFViewPager)m_layout.findViewById(R.id.pdf_pager);
        this.context = context;
        return m_layout;
    }
    @ReactProp(name = "src")
    public void setSrc(RelativeLayout view, @Nullable String src) {
        m_doc = new Document();
        m_stream = new PDFFileStream();
        boolean ok = m_stream.open(src);
        if( !ok ) return;
        int ret = m_doc.OpenStream(m_stream, null);
        if( ret != 0 )
        {
            m_doc.Close();
            m_doc = null;
            return;
        }
        m_pager.PDFOpen(m_doc,1);
    }
    @ReactProp(name = "pageNumber")
    public void setPageNumber(RelativeLayout view, int pageNum) {
        m_pager.setCurrentItem(pageNum);
    }
}

Please Log in or Create an account to join the conversation.

Last edit: by josalo.

Blue Pages 2 years 6 months ago #10647

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • Thank you received: 65
Hi,
I have checked your pdf with the View Pager of the demo library (PDFViewPager) and it works properly.
What version of the library are you using? Can you reproduce the issue with the last version of the demo project?
www.radaeepdf.com/download/download-prev.../34-radaeepdf-362rc3

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum