How to convert from PDF to XPS?

I use the following method to print an XPS file with adobe acrobat:

private void GenerateXPS(String filename)
        {
            Process proc = new Process();
            proc.StartInfo.FileName = "AcroRd32.exe";
            proc.StartInfo.Arguments = "/t " + filename + ".pdf" + " " + "\"Microsoft XPS Document Writer\"";
            proc.Start();
        }

But the problem is that the author of the Microsoft XPS document needs a file name to store the document. Now I am asked to enter this Adobe Acrobat file name, but I want to pass this file name also in the arguments. Or, if this is not possible, use the same file name. Is it possible?

+3
source share
1 answer

If this is not necessary, you are using acrobat, you can try to print the file directly in the Microsoft XPS Document. You can do this without the appearance of a user interface. (see Feng Yuan blog post for more details )

+1
source

Source: https://habr.com/ru/post/1793388/


All Articles