フィルターのクリア

Interface printer with matlab

1 回表示 (過去 30 日間)
Nuwan Dassanayake
Nuwan Dassanayake 2013 年 12 月 4 日
回答済み: Walter Roberson 2013 年 12 月 4 日
I need to print MATLAB command window output using a printer. Does anyone know interfacing codes.

採用された回答

Walter Roberson
Walter Roberson 2013 年 12 月 4 日
Presuming MS Windows:
pfid = fopen('LPT:', 'w');
fprint(pfid, 'something to be sent to the printer');
fclose(pfid)
This simple version assumes that the printer will handle printing plain text. Which is perhaps getting increasingly rare. But if the printer will not handle printing plain text, then write the output to a file and then tell a program to convert the file to whatever your printer does handle (e.g., pdf files), and then to send that resulting file to the printer.
If you want to launch the MS Windows printer tool, there is an ActiveX somewhere around that can deal with that.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by