ポストスクリプトファイルにメッセージを挿入したいac#アプリケーションがあるので、次のようなフォームを作成しました
%%BeginResource: form myfrm
/myfrm
<<
/FormType 1
/BBox [ 0 0 771 618] def
/Matrix [1 0 0 1 0 0] def
/PaintProc{pop
..........
}
>> /Form defineresource pop
%%EndResource
このようにページに挿入すると
newpath
gsave
3800 5025 translate
3221.875 2575 scale
myfrm execform
grestore
closepath
ghostviewで表示するとエラーが発生します。私が間違っていることの提案は、以前はテキストから画像を作成し、EPS形式で挿入することでしたが、psファイルのサイズが大きくなりました。また、可能であれば、ポストスクリプトにテキストボックスを挿入できます。
編集後:-
/myfrm
<<
/FormType 1
/BBox [ 0 0 771 618]
/Matrix [1 0 0 1 0 0]
/PaintProc{pop
0 0 moveto
(my name is ali) show
}
>> def
.....
.....
.....
newpath
gsave
3800 5025 translate
3221.875 2575 scale
myfrm execform
grestore
closepath
ただし、テキストは表示されません