forked from jsonkenl/erlguten
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation on the minimum steps to create a one page PDF; re…
…moved un-needed code in eg_test6.erl
- Loading branch information
1 parent
834ccf1
commit a0a43ac
Showing
3 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
A Mininal PDF Contruction | ||
========================= | ||
|
||
The following code id the minimum you need to create a one page PDF | ||
with calls to the pdf module. | ||
|
||
### PDF = pdf:new(), | ||
|
||
To create a pdf into which to put content | ||
|
||
|
||
### pdf:set_pagesize(PDF,a4), | ||
|
||
To set the page size of the PDF. Other choices are letter, legal, lots of A formats and B formats. | ||
|
||
### pdf:set_page(PDF,1), | ||
|
||
To set the page you are working on | ||
|
||
|
||
### pdf:set_font(PDF, "Victorias-Secret", 40), | ||
|
||
To set the font to use until told different | ||
|
||
### pdf_lib:moveAndShow(PDF, 50, 700, "Hello Joe from Gutenburg"), | ||
|
||
To move to position (50,700) and place the "Hello Joe from Gutenberg content" | ||
|
||
### Serialised = pdf:export(PDF), | ||
|
||
To create all the content of the pdf as a string in the term Serialised | ||
|
||
|
||
### file:write_file("../test/eg_test6.pdf",[Serialised]), | ||
|
||
To output the pdf content into a finsihed PDF file | ||
|
||
|
||
### pdf:delete(PDF). | ||
|
||
To delete the PDF object and process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.