form_combo: Example code of Early Access iText

简介:
using  System;
using  iTextSharp.text;
using  iTextSharp.text.pdf;
using  System.IO;
public   class  form_combo
{
    
    
    [STAThread]
    
public   static   void   Main( string [] args)
    {
        Document document 
=   new  Document(PageSize.A4,  50 50 50 50 );
        
try
        {
            
//  creation of the different writers
            PdfWriter writer  =  PdfWriter.GetInstance(document,  new  FileStream( @" e:\java\form_combo.Pdf " , FileMode.Create));
            
            document.Open();
            PdfContentByte cb 
=  writer.DirectContent;
            cb.MoveTo(
0 0 );
            
string [] options  =   new   string []{ " Red " " Green " " Blue " };
            PdfFormField field 
=  PdfFormField.CreateCombo(writer,  true , options,  0 );
            field.SetWidget(
new  Rectangle( 100 700 180 720 ), PdfAnnotation.HIGHLIGHT_INVERT);
            field.FieldName
= ( " ACombo " );
            field.ValueAsString
= ( " Red " );
            writer.AddAnnotation(field);
            document.Close();
            System.Console.Out.WriteLine(
" FIM. " );
        }
        
catch  (System.Exception de)
        {
            System.Console.Error.WriteLine(de.Message);
        }
    }
}
 
 
本文转自 RubyPdf 的中文博客博客园博客,原文链接: http://www.cnblogs.com/hardrock/archive/2006/07/25/459171.html /,如需转载请自行联系原作者
相关文章
|
Windows
DTDragDropFile UE Drag the system file to the window Plug-in Description
DTDragDropFile UE Drag the system file to the window Plug-in Description
108 0
|
小程序
小程序警告:Now you can provide attr `wx:key` for a `wx:for` to improve performance.
小程序警告:Now you can provide attr `wx:key` for a `wx:for` to improve performance.
4815 0
Cannot find source code based button in SE24
When you are logging on to customer system for incident handling, you want to switch to source code to perform some keyword search. However, you could not find button “Source code based builder” in toolbar, with following warning message: ———————————————— 版权声明:本文为CSDN博主「汪子熙」的原创文章,遵循CC 4.0 BY-SA版权协
Cannot find source code based button in SE24
|
Android开发
解决 error: style attribute '@android:attr/windowEnterAnimation' not found.
解决 error: style attribute '@android:attr/windowEnterAnimation' not found.
206 0
- Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as t
vue.js报错如下: - Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as , as they will not be parsed.
5681 1
|
Android开发
Android Studio 解决Error:(781) Multiple substitutions specified in non-positional format; did you ...
异常信息: /Users/mazaiting/AndroidStudioProjects/WisdomSite/app/build/intermediates/res/merged/debug/values/values.
1525 0