Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7343 Reply

    John

    Hello,
    How can I change the background color of the PDF viewer (the color behind the pages)? By default, it is gray but I did not find a way to change it.
    Thank you

    #7347 Reply

    Dr. Plug
    Moderator

    Hello John,

    Thank you for your inquiry.

    1. In iOS, with PlugPDFDocumentView‘s setBackgroundColor method:

    2. In Android, with BasePlugPDFDisplay‘s SetBackGroundColor method:

    I hope this helps.

    #7352 Reply

    John

    It works!
    Thanks

    #9676 Reply

    Frederic

    Hello,

    I’d like to change the reader background color with iOS, but this doesn’t work :

    [viewController.documentView setBackgroundColor:[UIColor redColor]];

    I call this several times, but nothing changes :

    #9699 Reply

    Dr. Plug
    Moderator

    Hello Frederic,

    Could you used a setBackgrounColor method at viewDidLoad which is in DocumentViewControllerDelegate?
    Actually in that line (11) , documentView isn’t loaded yet. that’s why setBackground doesn’t work.
    if you used this sample code, it works well.

    Best Regards,
    Dr.Plug

    • This reply was modified 1 year, 2 months ago by  Dr. Plug.
    #9736 Reply

    Frederic

    Hi,

    I can locate the DocumentViewControllerDelegate.h but I can’t see DocumentViewControllerDelegate.m file where methods should be implemented.

    Regards,
    Frederic

    #9766 Reply

    Dr. Plug
    Moderator

    Hello Frederic,

    Actually you don’t need a .m file it is already in PlugPDF.framework.
    If you follow this sample code, you can use a ViewDidLoad.

    Best Regards,
    Dr.Plug

    #10676 Reply

    skt

    integrated plugpdf free trial and after 1 days of successfull execution now its giving plugpdf .h not found ?? Thanks

    #10803 Reply

    Dr. Plug
    Moderator

    Hello skt,

    Thank you for the inquiry and sorry for the late answering.
    Could you explain in more detail about the problem you have?
    We don’t know the what the problem it is using your question.

    Regards,
    Dr.Plug

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Android: Change viewer background
Your information: