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

在使用Delphi的Printer组件打印图片时,遇到图片打印不完整的问题,有时会缺失一张或多张图片,问题不定期出现,涉及图片加载及打印过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

图片打印丢失问题,大家请帮忙!(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.youkuaiyun.com/Expert/topic/5216/5216675.xml?temp=.9262659

转载于:https://www.cnblogs.com/delphi2007/archive/2009/02/11/1388382.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值