mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
update readme to show builder output
removes outdated information from the readme and add an image to show pdfdocumentbuilder output
This commit is contained in:
parent
66fc244083
commit
005cbe5754
11
README.md
11
README.md
@ -58,12 +58,17 @@ To create documents use the class ```PdfDocumentBuilder```. The Standard 14 font
|
||||
// Fonts must be registered with the document builder prior to use to prevent duplication.
|
||||
PdfDocumentBuilder.AddedFont font = builder.AddStandard14Font(Standard14Font.Helvetica);
|
||||
|
||||
page.AddText("Hello World!", 12, new PdfPoint(25, 520), font);
|
||||
page.AddText("Hello World!", 12, new PdfPoint(25, 700), font);
|
||||
|
||||
byte[] documentBytes = builder.Build();
|
||||
|
||||
File.WriteAllBytes(@"C:\git\newPdf.pdf", documentBytes);
|
||||
|
||||
The output is a 1 page PDF document with the text "Hello World!" in Helvetica near the top of the page:
|
||||
|
||||

|
||||
|
||||
|
||||
Each font must be registered with the PdfDocumentBuilder prior to use enable pages to share the font resources. Only Standard 14 fonts and TrueType fonts (.ttf) are supported.
|
||||
|
||||
## Usage ##
|
||||
@ -290,8 +295,6 @@ PDF files may contain other files entirely embedded inside them for document ann
|
||||
|
||||
## Issues ##
|
||||
|
||||
At this stage the software is in Alpha. In order to proceed to Beta and production we need to see a wide variety of document types.
|
||||
|
||||
Please do file an issue if you encounter a bug.
|
||||
|
||||
However in order for us to assist you, you **must** provide the file which causes your issue. Please host this in a publically available place.
|
||||
@ -300,8 +303,6 @@ However in order for us to assist you, you **must** provide the file which cause
|
||||
|
||||
*Why is class or property X internal?* Internal properties and classes are not stable enough for the end user yet. If you want to access them feel free to use reflection but be aware they may change or disappear between versions.
|
||||
|
||||
Most testing has taken place with Latin character sets. Due to the more complex way the PDF specification handles CJK (Chinese, Japanese and Korean) character sets these will probably not be handled correctly for now. Please raise an issue (or preferably a pull request) if you have problems trying to read these documents.
|
||||
|
||||
## Credit ##
|
||||
|
||||
This project wouldn't be possible without the work done by the [PDFBox](https://pdfbox.apache.org/) team and the Apache Foundation. Any bugs in the code are entirely my fault.
|
||||
|
BIN
documentation/builder-output.png
Normal file
BIN
documentation/builder-output.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue
Block a user