Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (10)
    As of 2015-07-31 01:33 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (274 votes), past polls