File tree Expand file tree Collapse file tree
Forms/Enabling-Edit-Option-for-the-PdfComboboxField/Enabling-Edit-Option-for-the-PdfComboboxField Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- //Create a new PDf document
2-
3- using Syncfusion . Pdf ;
1+ //Create a new PDF document
42using Syncfusion . Pdf . Graphics ;
53using Syncfusion . Pdf . Interactive ;
4+ using Syncfusion . Pdf ;
65using Syncfusion . Drawing ;
76
87PdfDocument document = new PdfDocument ( ) ;
98
10- //Creates a new page and adds it as the last page of the document
11-
9+ //Add page
1210PdfPage page = document . Pages . Add ( ) ;
1311
12+ //Create a PDF standard font
1413PdfFont font = new PdfStandardFont ( PdfFontFamily . Courier , 12f ) ;
1514
1615//Create a combo box
1716
1817PdfComboBoxField positionComboBox = new PdfComboBoxField ( page , "positionComboBox" ) ;
1918
20- positionComboBox . Editable = true ;
21-
19+ //Set the combo box bounds
2220positionComboBox . Bounds = new RectangleF ( 100 , 115 , 200 , 20 ) ;
2321
22+ //Set the font
2423positionComboBox . Font = font ;
2524
25+ //Enable editing option
2626positionComboBox . Editable = true ;
2727
2828//Add it to document
29-
3029document . Form . Fields . Add ( positionComboBox ) ;
3130
32- using ( FileStream outputFileStream = new FileStream ( Path . GetFullPath ( @"../../../ Output/Output.pdf" ) , FileMode . Create , FileAccess . ReadWrite ) )
31+ using ( FileStream outputFileStream = new FileStream ( Path . GetFullPath ( @"Output/Output.pdf" ) , FileMode . Create , FileAccess . ReadWrite ) )
3332{
3433 //Save the PDF document to file stream.
3534 document . Save ( outputFileStream ) ;
3635}
37- document . Close ( true ) ;
38-
36+ document . Close ( true ) ;
You can’t perform that action at this time.
0 commit comments