Preface
Lishui City automobile transportation Group Co., Ltd. Information Center min Anting
PDF files are currently popular electronic document formats. They are often used in the development of office automation (OA) and other software. However, there are very few documents about how to create PDF files, the same "brute-force" cracking method is posted on the Internet. The code snippets are as follows:
StreamWriter pPDF = new StreamWriter (filePath );
ArrayList xRefs = new ArrayList ();
Float yPos = 0f;
Long streamStart = 0;
Long streamEnd = 0;
Long streamLen = 0;
String strPDFMessage = null;
// PDF document header information
StrPDFMessage = "% PDF-1.1 ";
ConvertToByteAndAddtoStream (strPDFMessage );
XRefs. Add (mPDF. Length );
Str1_message = "1 0 obj ";
ConvertToByteAndAddtoStream (strPDFMessage );
Str1_message = "</Length 2 0 R> ";
ConvertToByteAndAddtoStream (strPDFMessage );
StrPDFMessage = "stream ";
ConvertToByteAndAddtoStream (strPDFMessage );
......
After reading the above production method, I broke three glasses. If the above original method can be used to produce a satisfactory PDF file, it must be a genius. Later, I saw a special PDF file from a website (Web site: http://itextsharp.sourceforge.net/index.html) control of the production of the introduction, dark joy, immediately download the test, it is very easy to make the desired PDF file, because the website is English and has a lot of content, it is very laborious to read. After solving my own problems, I can see that many netizens are still making PDF files and being depressed, therefore, I decided to translate the content into Chinese. Because my English level is average and many places are obscure, the quality of translation is not very satisfactory. Please make an axe, but most of them can understand it. The purpose of this article is to solve the urgent needs of some netizens. The second is to inspire others. If any of you are willing to translate the content of this website accurately, it is a great fortune.
To generate a PDF file using the method described in this article, two controls are required: Prepare. All these resources are stored on my ftp site (ftp: // 202.107.251.26) in the "pdf file creation Guide" folder (the other two rar files in the folder are the source code of the two controls for your study), you can download the corresponding resources here, or you can download it directly from the original website.