Printing

Mike Bray (Quote Loader Author)'s Avatar

Mike Bray (Quote Loader Author)

25 Apr, 2015 08:19 AM

I am adding printing to my extension. I see that MD has a generic report generator which isn't exposed in the development API. Is it OK to use these classes? Or do you mind if I base my classes on these to get a generic viewer and printer?

Also, there is a class for UserPreferences which seems to read data from config.dict and is maintained via the File/Preferences dialog. Again is it OK to use this or should I create my own equivalent classes?

Regards
Mike

  1. Support Staff 1 Posted by Sean Reilly on 27 Apr, 2015 09:33 PM

    Sean Reilly's Avatar

    Hi Mike!

    Using the UserPreferences class/instance is safe for storing basic data types (strings, ints, etc).

    As for printing, the report generator API hasn't changed in quite a while so it should be safe with the caveat that you should be careful with it. Eventually I do hope to expose an interface for extensions to generate reports and graphs that are shown in the built-in viewers and printers, but that is likely to be a while off.

    The printing API that we have should be safe to use for a little while but it's a pretty thin shim so I don't think it'd be too much help for you anyway.

    Thanks,
    Sean

  2. 2 Posted by Mike Bray (Quot... on 28 Apr, 2015 07:56 AM

    Mike Bray (Quote Loader Author)'s Avatar

    Thanks Sean

    I looked at your print classes and determined that it seems to be built to replicate the viewer on paper scaling down the font to fit it in. This works when you only have 3 or 4 columns. I wish to have reports that have one column per month so it could be 15 or even 27 columns.

    I am, therefore building a report interface that is similar but will allow many columns that go across more than one page with row headers repeated. It will have similar name to your classes but will not use them. As you say your API is quite restrictive. I will use the User Preferences for fonts etc so it looks like MD.

    Thanks for your help.
    Regards
    Mike

  3. Sean Reilly closed this discussion on 28 Apr, 2015 07:58 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac