Windows 10では、WSLのwgetからダウンロードしたPDFファイルを開くことができません。

Windows 10では、WSLのwgetからダウンロードしたPDFファイルを開くことができません。

パスワードで保護されたウェブサイトからPDFファイルをダウンロードしたいと思います。これを行うには、wget --auth-no-challenge --http-user="username" --http-password="password" "url_to_pdf"次の応答を受信したときにサーバーに正しく接続され、文書をダウンロードしました。

--2022-09-02 13:14:51--  https://moodle.lmu.de/pluginfile.php/1568574/mod_label/intro/ex2_2022.pdf
Resolving moodle.lmu.de (moodle.lmu.de)... 129.187.255.141, 2001:4ca0:0:103::81bb:ff8d
Connecting to moodle.lmu.de (moodle.lmu.de)|129.187.255.141|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://moodle.lmu.de/user/policy.php [following]
--2022-09-02 13:14:52--  https://moodle.lmu.de/user/policy.php
Reusing existing connection to moodle.lmu.de:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘ex2_2022.pdf.1’

ex2_2022.pdf.1                    [ <=>                                              ]  75.64K  --.-KB/s    in 0.1s

2022-09-02 13:14:52 (531 KB/s) - ‘ex2_2022.pdf.1’ saved [77453]

しかし、問題は、Windowsファイルマネージャでそのディレクトリに移動してAdobe Acrobatを使用して開こうとすると、次のエラーが発生することです。 Adobeエラー

Windows 10、WSL、Ubuntu 18.04 LTSを使用しています。

ベストアンサー1

Wget出力を詳しく見ると、ダウンロードしたい「PDF」ファイルがWebページ(https://moodle.lmu.de/user/policy.php)。出力で次の行を確認してください Length: unspecified [text/html]。 HTMLファイルをダウンロードしています。 Adobe Acrobatがそれを読むことができないのは当然です。信じられない場合は、メモ帳でファイルを確認してください。これでHTMLコードが見えるかもしれません!

おすすめ記事