1

In the advanced print settings inside adobe acrobat reader, I have noticed that there is a print to file option. I am currently developing a library of functions in vb.net that prints files of various formats to print language files (postscript). I can't seem to find however a way to access this functionality programmatically, is there a way to do this without using a third party tool as I need to try and avoid using external libraries if at all possible.

1 Answer 1

1

You can use the PrintDocument class to print to a PostScript printer on the FILE: port. PostScript print drivers are provided with Windows by default. An example is HP LaserJet 2800 PS, which is provided with Server 2008. Generally if it has PS in the name the printer will be able to print to file.

https://learn.microsoft.com/en-us/dotnet/api/system.drawing.printing.printersettings.printtofile

    ...
    printDocument1.PrinterSettings.PrintToFile = true
    printDocument1.PrinterSettings.PrintFileName = "c:\temp\test.ps"
    printDocument1.Print()
Sign up to request clarification or add additional context in comments.

1 Comment

Is there a way to do this with PowerShell?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.