Archive for the 'iTextSharp(iText#)' Category

Converting Adobe Designer Static forms to Acrobat PDF Forms

In Ted Padova’s post, he said,

Adobe Designer 8 supports two different types of forms: Static forms and Dynamic forms. If a form is created as a static form you can easily convert the form in Acrobat 8 to a PDF form.

and he give the steps on how to convert Adobe Designer forms to Acrobat PDF Forms.

This let me thought that I have also done this kind job before, but I did not rely on Adobe Acrobat, just rely iTextSharp, I have used it in my demo software FormServer, and it also have a online demo, Fill and Save PDF Form online, in fact they are the clone of commercial software.
Here is some features about FormServer,

  • support automatically convert static PDF forms created by Adobe Designer to Acrobat Form.
  • support save data to PDF Forms without Adobe Acrobat, only Adobe reader is enough.
  • support save data to FDF

And a HK company found my FormServer, and asked for the source code of “Converting static PDF forms created by Adobe Designer to Acrobat Form”, finally I sold they on US$400.

PS.
With the examples of Bruno Lowagie,Using iText to Fill PDF Forms Created by Adobe Designer, iText can both support Dynamic Forms and Static Forms created by Adobe Designer now.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

Digital Signature PDF Documents With Free Software

A digital signature is like a paper-based signature – each giving you a method for adding a unique identifier to a document. Both provide you with an easy way to show a person signed a particular document at a particular time, but a digital signature goes further as it can ensure that the document content has not been tampered with after it was signed. In addition, the document version history can let recipients see when a document was signed and see when any changes were made to it. This revision history is encrypted and stored inside the PDF and can be viewed at anytime via the Signatures pane.

To digitally sign a PDF document, you must have a digital ID, and to verify other people’s signatures, you must first share your digital IDs and add each other to your Trusted Contacts list.

Most Digital Signature software are not free, but I will introduce you some free software developed in JAVA and DOTNET with the power of iText and iTextSharp.

Want to develop your own? please visit How to sign a PDF using iText and iTextSharp.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

Font CharSet and Encoding

yesterday, A Chinese developer sent me WMF with Chinese character, and the FontFace name is also Chinese, he said the iTextSharp could convert the WMF to PDF correctly. so I try to debug into the source code, and find MetaFont only support ASCII.

try {
faceName = System.Text.Encoding.GetEncoding(1252).GetString(name, 0, k);
}
catch {
faceName = System.Text.ASCIIEncoding.ASCII.GetString(name, 0, k);
}

but charset of Chinese font(GB2312) is 134, so I think the source code needs to get encoding from charset, and then get the right faceName.
Finally, I get the following codes,

public enum FontCharSet : byte
{
ANSI_CHARSET = 0,// ANSI charset (Windows-1252)
DEFAULT_CHARSET = 1,
SYMBOL_CHARSET = 2,
MAC_CHARSET = 77,
SHIFTJIS_CHARSET = 128,// Shift JIS charset (Windows-932)
HANGEUL_CHARSET = 129,// Hangeul charset (Windows-949)
HANGUL_CHARSET = 129,
JOHAB_CHARSET = 130, // Johab charset (Windows-1361)
GB2312_CHARSET = 134,// GB2312 charset (Windows-936)
CHINESEBIG5_CHARSET = 136,// Chinese Big5 charset (Windows-950)
GREEK_CHARSET = 161, // Greek charset (Windows-1253)
TURKISH_CHARSET = 162,// Turkish charset (Windows-1254)
VIETNAMESE_CHARSET = 163,// Vietnamese charset (Windows-1258)
HEBREW_CHARSET = 177,// Hebrew charset (Windows-1255)
ARABIC_CHARSET = 178,// Arabic charset (Windows-1256)
BALTIC_CHARSET = 186,// Baltic charset (Windows-1257)
RUSSIAN_CHARSET = 204,// Cyrillic charset (Windows-1251)
THAI_CHARSET = 222,// Thai charset (Windows-874)
EASTEUROPE_CHARSET = 238, // Eastern european charset (Windows-1250)
OEM_CHARSET = 255,
}

and some very useful source codes( WMFUtilities.java and WMFConstants.java ) file from Apache Batik, it has implement the charset issue.

BTW, iText also has the same issue,

187 try {
188 font = BaseFont.createFont(fontName, "Cp1252", false);
189 }
190 catch (Exception e) {
191 throw new ExceptionConverter(e);
192 }

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride