Want to print a Text File

I want to print a Text file but it is printing an empty document, there is no contents inside the generated PDF Printed file.

var pd = new PrintDocument
DocumentName = fileName,
DefaultPageSettings =
Landscape = this.Landscape

Can someone please help…

Hai @Rajtk7,

You need to convert text file into pdf file Right?


Yes Aravind

But when i am using process.start. Print concept it’s printing in Portrait Mode. But i want in Landscape.

Could you share your workflow file.,


Main (1).xaml (7.4 KB)
1.xls (1021 Bytes)

Change the .xls file extension to .txt.

i am trying to print it in same format/ look. If we print in Landscape then its comes in proper way.

@Rajtk7 its working properly only what the need in that

ok. is there any option to change the printer settings to landscape mode. Any xaml file . invoke code pls

Hi @Rajtk7

Check out this post. From reading your xaml, you’re setting the DefaultPage setting for the printer. Try to set it for the document itself.