现在的位置: 首页 > 综合 > 正文

图片打印丢失问题,大家请帮忙!(100分)

2012年02月07日 ⁄ 综合 ⁄ 共 1387字 ⁄ 字号 评论关闭
图片打印丢失问题,大家请帮忙!(100分) Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiBase/html/delphi_20061207224630228.html
我使用Printer打印一些图片,部分代码如下:  
   
        with   printer   do  
                begin  
                    begindoc;  
                    if   image1.picture.graphic<>nil   then   canvas.stretchdraw(strect1,   image1.picture.graphic);  
                    if   image2.picture.graphic<>nil   then   canvas.stretchdraw(strect2,   image2.picture.graphic);  
                    if   image3.picture.graphic<>nil   then   canvas.stretchdraw(strect3,   image3.picture.graphic);  
                    if   image4.picture.graphic<>nil   then   canvas.stretchdraw(strect4,   image4.picture.graphic);  
                    if   image5.picture.graphic<>nil   then   canvas.stretchdraw(strect5,   image5.picture.graphic);  
                    if   image6.picture.graphic<>nil   then   canvas.stretchdraw(strect6,   image6.picture.graphic);  
                    if   image7.picture.graphic<>nil   then   canvas.stretchdraw(strect7,   image7.picture.graphic);  
                    if   image8.picture.graphic<>nil   then   canvas.stretchdraw(strect8,   image8.picture.graphic);  
                    enddoc;  
                end;  
   
  一次打印8张图片,image1~image8都用OpenPictureDialog装入了图片,可是到打印输出的时候,有时候可以打印完8张图片,可有时候会少打印出1张或几张图片,且不一定总是一个位置的图片,可能是第8张图片,又可能是第6张图片,或者几张都打不出来,找不出问题所在,都装入了图片,就是打印不完整!  
   
   
  大家知道问题的请告诉我,等待中。。。

顶上,看下!

用加载图片会比较慢,建议你拷贝象素试试,方法是TCanvas.CopyRect,

把windows的虚拟内存值设置大一点试一下

强烈鄙视问题解决后不结贴的人!  
  强烈鄙视技术问题解决后把贴子转移到非技术区的人!  
  鄙视你们!  
   
  http://community.csdn.net/Expert/topic/5216/5216675.xml?temp=.9262659

抱歉!评论已关闭.