2

こんにちは、pdf417 バーコードの生成に取り組んでいます。このために、このリンクをたどりました。

try { 

             String a = "Microsoft";
             String b = "wkejew";
                PDF417 barcode = new PDF417(); 
                barcode.setData(a+b); 

               // barcode.setData(a);

                ServletOutputStream servletoutputstream = response.getOutputStream(); 

                response.setContentType("image/gif"); 
                response.setHeader("Pragma", "no-cache"); 
                response.setHeader("Cache-Control", "no-cache"); 
                response.setDateHeader("Expires", 0); 

                barcode.drawBarcode(servletoutputstream);
 } catch (Exception e) { 
                throw new ServletException(e); 
            }

今の問題は、取得しているバーコードの幅が広いことです。では、幅を狭めることはできますか?

4

1 に答える 1

0

あなたのリンクから:

生成されたバーコード PDF-417 画像の幅と高さを設定するには?上へ

プロパティのbarcodeWidthとbarcodeHeightの値を使用して、バーコード画像の幅と高さを設定できます。

または、X (バー モジュールの幅) と Y (バー モジュールの高さ) の値を設定できます。

于 2015-02-20T07:16:04.213 に答える