How do I implement PDF control in MP plugin? (1 Viewer)

JestriK

Portal Member
August 10, 2006
7
0
Southsea, UK
I am currently writing a plugin for viewing ebooks in MP.

I have desigined the GUI for the plugin and at the moment I have come up against an obstacle.

The first picture below shows the GUI for the plugin (nothing special - pretty much like all other plugins). The second picture shows a windows form with a control from PDFSharp (open source c# pdf editing/viewing library).

currentpluginlo7.jpg


pdfcontroluo6.jpg


I want to put the PDF viewing control from the windows form (2nd screenshot) into the white box on the first screenshot. (I have drawn the white box to illustrate my point - don't worry it won't be there on the plugin!)

I can't think of any way of doing this, hence the post.

What XML should I use to declare this control in the XML skin file, more specifically, what do I put in between the <type></type> tags?

Any help/tips would be most appreciated.

Regards,
JestriK
 

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Hmm, interesting. What type of object do you get back from SharpPDF? In other words, if you were to build a Winforms app what control would you drop the result onto? I almost suspect they have their own custom control type which you can drop onto any container control in Winforms.

    If so, I think your best bet would be to look at the WebBrowser Plugin since *I think* this one also has to display some custom Winforms Control type (that Mozilla Plugin you have to install) and see how this is achieved there and how it handles things like scrolling with the remote.

    Hope this is of any help to you.
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    Alternatively, if you can somehow get the PDF doc exported to a System.Drawing.Bitmap object, then you can maybe show it in MP as a graphic.

    Given there's no need to be able to select anything on the actual object, (unlike the webbrowser control, where you need to be able to select links) it should be OK to represent the PDF file as a graphics object.

    Sam
     

    mPod

    Portal Pro
    January 26, 2005
    2,084
    3
    Berlin
    Home Country
    Germany Germany
    A good PDF has (internal) hyperlinks (mainly for the table of contents), so you need it selectable.
     

    Users who are viewing this thread

    Top Bottom