请问Delphi7下的ZIntQRCode控件,怎么打印二维码?谢谢!

解决方案 »

  1.   

    https://github.com/chaosben/theunknownones/tree/008e179efedb99dd2ec1e40b83ef2b15ec62e18e/Libraries/Zint
      

  2.   

    显示在form1上

    Form1.Print;
      

  3.   

    能否发个dome,[email protected],谢谢!
      

  4.   

    input_mode :=KANJI_MODE 这样就支持中文了我不知道你的控件是不是DLL版的如果是的话,那么可以用ZBarcodeToBitmap来转换;如果是github的源码版的,那么用以下函数转换成bitmap就行
    procedure GraphicToBitmap(const Src: Graphics.TGraphic;
      const Dest: Graphics.TBitmap;
      const TransparentColor: Graphics.TColor=Graphics.clNone);
    begin
      // Do nothing if either source or destination are nil
      if not Assigned(Src) or not Assigned(Dest) then
        Exit;
      // Size the bitmap
      Dest.Width := Src.Width;
      Dest.Height := Src.Height;
      if Src.Transparent then
      begin
        // Source graphic is transparent, make bitmap behave transparently
        Dest.Transparent := True;
        if (TransparentColor <> Graphics.clNone) then
        begin
          // Set destination as transparent using required colour key
          Dest.TransparentColor := TransparentColor;
          Dest.TransparentMode := Graphics.tmFixed;
          // Set background colour of bitmap to transparent colour
          Dest.Canvas.Brush.Color := TransparentColor;
        end
        else
          // No transparent colour: set transparency to automatic
          Dest.TransparentMode := Graphics.tmAuto;
      end;
      // Clear bitmap to required background colour and draw bitmap
      Dest.Canvas.FillRect(Classes.Rect(0, 0, Dest.Width, Dest.Height));
      Dest.Canvas.Draw(0, 0, Src);
    end;
    资料:
    Delphi 调用Zint 实现二维码功能 
    Delphi Graphic转换成Bitmap
    (转载) Delphi中打印条码的方法