Hello, world! PDF版
Posted feedbacks - Smalltalk
SPDF をインストールした Squeak Smalltalk で。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | | file pdfWriter page text textState textPositioning |
file := FileStream fileNamed: 'doukaku50.pdf'.
pdfWriter := PDFWriter on: file.
pdfWriter compressionOff.
page := pdfWriter defaultPage.
text := PDFTextObject for: page pageDescription.
textState := PDFTextState for: text.
textState fontPitch: 140.
textState font: (PDFFont type1Helvetica).
textPositioning := PDFTextPositioning for: text.
textPositioning coordinate: (PDFPoint x: 10 y: 250).
text addOperator: textPositioning.
text addOperator: textState.
text write: 'Hello, world!'.
page addTextObject: text.
pdfWriter close.
file close
|


にしお
#3406()
Rating0/0=0.00
[ reply ]