在 Windows 8 上将 .oxps 文件转换为 .pdf 文件

Sha*_*yna 8 conversion

我完成了一项大学作业,不小心将其另存为 .oxps 文件...如何在 Windows 8 上将 .oxps 文件转换为 .pdf?

Jos*_*osh 6

您可以尝试使用在线服务,例如:http : //online2pdf.com/oxps-to-pdf

您也可以尝试在 PC 上安装 PDF 打印机,打开.oxps文件,然后“打印”为 PDF。

PDF打印机:CutePDF


Tha*_*Guy 6

这可以使用GhostXPS(9.19 及更高版本)完成:

gxpswin64-9.19.exe -sDEVICE=pdfwrite -sOutputFile=pdffile.pdf -dNOPAUSE oxpsfile.oxps

根据需要更改 GhostXPS 可执行文件的名称。


批处理文件,便于转换

@echo off

C:\path\to\ghostxps.exe  -sDEVICE=pdfwrite -sOutputFile=%1.pdf -dNOPAUSE %1
Run Code Online (Sandbox Code Playgroud)

另存为oxps2pdf.bat或类似。

用法: oxps2pdf INPUTFILE

将 OXPS 到 PDF 转换添加到上下文(右键单击)菜单

  1. 启动注册表编辑器:运行: regedit.exe
  2. 导航 HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\
  3. 找到.oxps\key ,如果它不存在,则创建它(右键单击 --> New --> Key)
  4. 定位shell\子键,如果它不存在,创建它
  5. 创建pdfconvert\子项(名称并不重要)
  6. double click on the (Default) REG_SZ String to give the menu a name, i.e. Convert to PDF

Regedit 命令 描述 定义

  1. create 'command` subkey
  2. Define (Default) String to "C:\path\to\gxpswin64.exe" -sDEVICE=pdfwrite -sOutputFile=%1.pdf -dNOPAUSE %1

Regedit 命令定义

  1. Repeat the steps for .xps if you wish

Now you can see the new added context menu item Convert To PDF 上下文菜单项添加了屏幕截图

Adding OXPS to PDF conversion to the right-click menu (Send to)

As an alternative you can setup the Send To menu instead. This works, but is suboptimal.

  1. Navigate to your SendTo folder (Win-R to show Run dialog; enter shell:sendto).

  2. Inside the SendTo folder, create a shortcut to the oxps2pdf.bat batch file found above.

  3. Rename the newly created shortcut "Convert OXPS to PDF".

Now, when you right-click on a file, the Send To menu should contain "Convert OXPS to PDF".