Skip to main content

Translate PDF Files

By default, when you open a PDF file in a browser, the browser will open it with its built-in reader, but this reader is subject to browser security restrictions, so the translation of the word can only be used in the browser's built-in PDF reader in the following two ways:

  • Right-click after selecting a word and choose Translate this text.
  • After selecting a word, copy the text to the clipboard, and then use the shortcut key to open the standalone translation window.

If you want to use functions such as cross-page selection, screenshot translation, etc. like a normal webpage, you need to open the PDF in the built-in PDF reader of the word.

However, the built-in PDF reader also has some problems, specific problems can be seen in the common problems below.

How to Open the Built-in PDF Reader

  • Right-click on a link to a PDF file and choose 划词翻译 > Open this PDF in 划词翻译.
  • Open the extension button popup page, and click the Built-in PDF Reader button.
  • If the webpage contains a PDF file, 划词翻译 will prompt you to the URL of the PDF file in the lower right corner, click the URL to open the corresponding PDF file in the built-in PDF reader. (This feature is available since v8.6.0)
  • After enabling the Automatically open PDF option on the settings page, when you open a PDF file in the browser, it will automatically jump to the built-in PDF reader of the word. This option was enabled by default in v8.6.3 and earlier versions.
  • Right-click on the 划词翻译 extension button on the right side of the browser address bar, and click the Built-in PDF Reader menu item. (This menu item is available since v.9.5.0)
  • When you open a PDF file in the browser, the browser will use its native PDF reader to open it, you can right-click anywhere and choose Open this PDF in 划词翻译 since v9.5.0, this menu item has been removed.

Test link: https://arxiv.org/pdf/2104.13030.pdf

note

If you drag a PDF file from your computer into the browser, you need to allow 划词翻译 to access file URLs to see the prompt or automatically jump to the built-in PDF reader.

Frequently Asked Questions

Unable to Automatically Open PDF Files on Your Computer

If you check the Automatically open PDF option, and the PDF file you open by dragging it from your computer into the browser is still opened with the browser's built-in PDF reader, then you need to allow 划词翻译 to access local URLs.

Annotation Function

Upgrade 划词翻译 to v9.1.0 or later.

Alternatively, you can use 划词翻译 in the browser's built-in or third-party PDF reader, see Translate Content Outside the Browser for specific methods.

Webpage Full Translation Function Not Working

Due to the special structure of PDF files, the webpage full translation is indeed invalid in the built-in PDF reader.

Selected text lacks spaces, line breaks

This issue cannot be fixed in the short term. When you encounter this situation, please use screenshot translation.

Why not fix this issue?

The built-in PDF reader of 划词翻译 uses a third-party PDF.js, and this issue has never been fixed by PDF.js. If I fix this issue myself, there will be the following two problems:

  • The difficulty is very high, it may take a lot of time and may not be successfully fixed.
  • Even if I can fix this issue, I will have to ensure that my fixed code is compatible with their new versions when upgrading PDF.js.

All in all, it is simpler and more convenient to use screenshot translation directly.