Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

... Here is my code so far:

Sorry but that won't run, you're missing $htmlwindow -- compare to my example

I have tried to use SetFonts to reduce the font sizes on the preview page. The default sizes according to the wxwidgets.org are seven integers in the range -2 to +4. However only the third value, 0 seems to have any effect. When I change this from 0 to -1 the page text becomes too small to be readable.

Try positive integers, because the docs say

sizes This is an array of 7 items of int type. The values represent size of font with HTML size from -2 to +4 ( <FONT SIZE=-2> to <FONT SIZE=+4> ). Default sizes are used if sizes is NULL.

So wxHTML_FONT_SIZE_3 is size=-1 and wxHTML_FONT_SIZE_5 is size=+1 or some such combination

So try positive integers, like these (the wxHTML_FONT_SIZE_ constants no longer appear to be public )

#ifdef __WXMSW__ #define wxHTML_FONT_SIZE_1 7 #define wxHTML_FONT_SIZE_2 8 #define wxHTML_FONT_SIZE_3 10 #define wxHTML_FONT_SIZE_4 12 #define wxHTML_FONT_SIZE_5 16 #define wxHTML_FONT_SIZE_6 22 #define wxHTML_FONT_SIZE_7 30 #elif defined(__WXMAC__) #define wxHTML_FONT_SIZE_1 9 #define wxHTML_FONT_SIZE_2 12 #define wxHTML_FONT_SIZE_3 14 #define wxHTML_FONT_SIZE_4 18 #define wxHTML_FONT_SIZE_5 24 #define wxHTML_FONT_SIZE_6 30 #define wxHTML_FONT_SIZE_7 36 #else #define wxHTML_FONT_SIZE_1 10 #define wxHTML_FONT_SIZE_2 12 #define wxHTML_FONT_SIZE_3 14 #define wxHTML_FONT_SIZE_4 16 #define wxHTML_FONT_SIZE_5 19 #define wxHTML_FONT_SIZE_6 24 #define wxHTML_FONT_SIZE_7 32 #endif

Is there any way to scale the print out to fit a letter size page?

Sorry, I don't know. I imagine its possible, see
wxperl_demo --show wxPrintPaperDatabase
wxperl_demo --show wxPrinting

If you look inside Wx::DemoModules::wxPrinting you'll see a wxPrintout subclass calling a wxDC::SetUserScale, centers/resizes the image -- but I've never tried it


In reply to Re^5: How to use wxHtmlEasyPrinting by Anonymous Monk
in thread How to use wxHtmlEasyPrinting by halweitz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2022-12-05 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?