Printer.PaintPicture & EM_FORMATRANGE 
Author Message
 Printer.PaintPicture & EM_FORMATRANGE

Please HELP!!!! (spent too mach time on this already without any success)

I'm printing formatted text from richedit 2.0 with EM_FORMATRANGE message
and on the same page I'm printing picture with Printer.PaintPicture method.
Problem: Page rectangle (from FORMATRANGE structure) covers up a part of the
page and erases PaintPicture printing. I tried to print picture outside the
FORMATRANGE page rectangle - it comes out fine, but I NEED it to be printed
within the FORMATRANGE page rectangle.
It used to work with VB RichTextBox (based on RichEdit 1.0) but doesn't work
with later version of RichEdit. I've made a lot of changes in the program,
using RichEdit 2.0 features and can not upgrade the program because of this
problem

Thanks in advance
Sergey O



Mon, 09 May 2005 23:29:28 GMT  
 Printer.PaintPicture & EM_FORMATRANGE
Sergey while you are probably right in assuming the issue is related to
the newer versions of the control here are a couple of options to test:

1) Change your Printer Driver's output option type to RAW instead of EMF
or reverse the current setting. I have seen this fix this type of issue,
particularly on HP printers.

2) Output from the control using the EM_FORMATRANGE to a Enhanced
Metafile Device Context. Then blit from your picture to the Metafile DC.
Finally render the Metafile DC directly to the Printer. Something like
that..<grin>

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Quote:
> Please HELP!!!! (spent too mach time on this already without any
success)

> I'm printing formatted text from richedit 2.0 with EM_FORMATRANGE
message
> and on the same page I'm printing picture with Printer.PaintPicture
method.
> Problem: Page rectangle (from FORMATRANGE structure) covers up a part
of the
> page and erases PaintPicture printing. I tried to print picture
outside the
> FORMATRANGE page rectangle - it comes out fine, but I NEED it to be
printed
> within the FORMATRANGE page rectangle.
> It used to work with VB RichTextBox (based on RichEdit 1.0) but
doesn't work
> with later version of RichEdit. I've made a lot of changes in the
program,
> using RichEdit 2.0 features and can not upgrade the program because of
this
> problem

> Thanks in advance
> Sergey O



Wed, 11 May 2005 11:09:09 GMT  
 Printer.PaintPicture & EM_FORMATRANGE
Hi Stephen!
Thanks a lot for the response, I'll try to implement it.

Sergey O

PS
I'll keep you posted if it helped (if you're interested in a result)


: Sergey while you are probably right in assuming the issue is related to
: the newer versions of the control here are a couple of options to test:
:
: 1) Change your Printer Driver's output option type to RAW instead of EMF
: or reverse the current setting. I have seen this fix this type of issue,
: particularly on HP printers.
:
: 2) Output from the control using the EM_FORMATRANGE to a Enhanced
: Metafile Device Context. Then blit from your picture to the Metafile DC.
: Finally render the Metafile DC directly to the Printer. Something like
: that..<grin>
:
: --
:
: HTH
: Stephen Lebans
: http://www.lebans.com
: Access Code, Tips and Tricks
: Please respond only to the newsgroups so everyone can benefit.
:
:


: > Please HELP!!!! (spent too mach time on this already without any
: success)
: >
: > I'm printing formatted text from richedit 2.0 with EM_FORMATRANGE
: message
: > and on the same page I'm printing picture with Printer.PaintPicture
: method.
: > Problem: Page rectangle (from FORMATRANGE structure) covers up a part
: of the
: > page and erases PaintPicture printing. I tried to print picture
: outside the
: > FORMATRANGE page rectangle - it comes out fine, but I NEED it to be
: printed
: > within the FORMATRANGE page rectangle.
: > It used to work with VB RichTextBox (based on RichEdit 1.0) but
: doesn't work
: > with later version of RichEdit. I've made a lot of changes in the
: program,
: > using RichEdit 2.0 features and can not upgrade the program because of
: this
: > problem
: >
: > Thanks in advance
: > Sergey O
: >
: >
:



Sat, 14 May 2005 03:20:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Printer.Paintpicture and Picturebox.paintpicture

2. Problems with Paintpicture & Printer object in VB416

3. PaintPicture - quality of compression for printer and Imagebox

4. Help for Printer.PaintPicture

5. Printer.Paintpicture problem

6. Printer.PaintPicture : Need Help !!!!!!

7. Printer.PaintPicture Problem

8. Printer.PaintPicture No Picture on Print out

9. printer.paintpicture

10. Printer.PaintPicture

11. Error 481 - Invalid Picture / Printer.PaintPicture.

12. PaintPicture - compress quality for printer and Image

 

 
Powered by phpBB® Forum Software