Microsoft Wordドキュメント「.doc」、Microsoft excel '.xls'、Microsoft PowerPoint .pptファイルを.txt .csv .rtf .pdfなどの他のサポートされた形式に変換するためのシンプルなユーティリティ。
.txt、.rtf、.csvを.doc、.xls、または.pdf形式に変換するためにも使用できます。
古い単語文書を最新の形式に変換するために使用できます。
ホストマシンにMicrosoft Word、Excel、またはPowerPointがインストールされている必要があります。
githubリリースからリリースをダウンロード-https://github.com/tobya/docto/releases/詳細情報https://tobya.github.io/docto/
で利用できるより多くの例
リリースhttps://github.com/tobya/docto/releasesから.exeをダウンロードしてください
チョコレートを介してインストールすることもできます
Choco Install Docto
最新バージョンにアップグレードします
Choco Upgrade Docto
ノードラッパーは、@kerimg&@brrdによって作成されました
https://www.npmjs.com/package/node-docto
https://github.com/brrd/msoconvert
バグ、機能、または提案については問題を記録してください。
Microsoft Wordドキュメントをテキストに変換します
docto -f C:DirectoryMyFile.doc -O "C:Output DirectoryMyTextFile.txt" -T wdFormatText
Microsoft ExcelドキュメントをCSVテキストに変換します
docto -XL -f C:DirectoryMyFile.xls -O "C:Output DirectoryMyTextFile.csv" -T xlCSV
Microsoft WordドキュメントをPDFに変換します(これをサポートするMicrosoft Wordのバージョンが必要です)。
docto -f C:DirectoryMyFile.doc -O "C:Output DirectoryMyTextFile.pdf" -T wdFormatPDF
すべてのMicrosoft Wordドキュメントをディレクトリとそのサブディレクトリに変換します
docto -f "C:Dir with SpacesFilesToConvert" -O "C:DirToOutput" -T wdFormatPDF -OX .pdf
変換後に元のファイルを削除します(-R)。
docto -f "C:Dir with SpacesFilesToConvert" -O "C:DirToOutput" -T wdFormatPDF -OX .pdf -R true
各変換でwebhookを追加する(-w)
docto -f "C:Dir with SpacesFilesToConvert" -O "C:DirToOutput" -T wdFormatPDF -OX .pdf -W https://toflidium.com/webhooks/docto/webhook_test.php
Webhookは、各収束で呼び出されるURLであり、ファイルが変換されるたびに外部から再度再発行する機能を提供します。現在、 httpsアドレスは実験的であるため、問題がある場合は問題を記録します。
どこかでWildでDoctoを使用している場合は、このWikiページに詳細を追加してください
OneDrive / Office365 / Word 20xxでコンバージョンせずに機能するファイルの束をアップグレードする必要がある場合は、Docoを使用できます。このstackexchangeの質問を参照してください
https://webapps.stackexchange.com/questions/74859/what-format-does-word-online-use
Help
Docto Version:%s
Office Version : %s
Open Source: https://github.com/tobya/DocTo/
Description: DocTo converts Word Documents and Excel Spreadsheets to other formats.
Command Line Parameters:
Each Parameter should be followed by its value eg
-f "c:DocsMyDoc.doc"
Parameters markers are case insensitive.
-H This message
--HELP -?
-WD Use Word for Converstion (Default). Help '-h -wd'
--word
-XL Use Excel for Conversion. Help '-h -xl'
--excel
-PP Use Powerpoint for Conversion. help '-h -pp'
--powerpoint
-VS Use Visio for Conversion.
--visio
-F Input File or Directory
--inputfile
-FX Input file search for if -f is directory. Can use .rtf test*.txt etc
Default ".doc*" (will find ".docx" also)
--inputextension
-O Output File or Directory to place converted Docs
--outputfile
-OX Output Extension if -F is Directory. Please include '.' eg. '.pdf' .
If not provided, pulled from standard list.
--outputextension
-T Format(Type) to convert file to, either integer or wdSaveFormat constant.
Available from
https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word.wdsaveformat
or https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.excel.xlfileformat
or https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.saveas
See current List Below.
--format
-TF Force Format. -T value if an integer, is checked against current list
compiled in. It is not passed if unavailable. -TF will pass through value
without checking. Word will return an "EOleException Value out of range"
error if invalid. Use instead of -T.
--forceformat
-L Log Level Integer: 1 ERRORS 2 STANDARD 5 CHATTY 9 DEBUG 10 VERBOSE. Default: 2=STANDARD
--loglevel
-C Compatibility Mode Integer. Set to an INTEGER value from
https://msdn.microsoft.com/en-us/library/office/ff192388.aspx.
Set the compatibility mode when you want to convert documents to a later
version of word. See help '-h -c' for further info.
--compatibility
-E Encoding Integer: Sets codepage Encoding. See
https://msdn.microsoft.com/en-us/library/office/ff860880.aspx
for more details and values.
--encoding
-M Ignore all files in __MACOSX subdirectory if it exists. Default True.
--ignoremacos
-N Make list of files that take over n seconds to complete.
Use number of seconds over that conversion takes and add to list.
Outputs to filename 'docto.ignore.txt'
--listlongrunning
-NX Ignore any file listed in docto.ignore.txt, created by -N
--ignorelongrunninglist
-G Write Log to file in directory
--writelogfile
-GL Log File Name to Use. Default 'DocTo.Log';
--logfilename
-Q Quiet Mode: Nothing will be output to console. To see any errors you must
set -G or -GL. Equivalent to setting -L 0
--quiet
-R Remove Files after successful conversion: Default false; To use specify
value eg -R true
--deletefiles
-W Webhook: Url to call on events. See help '-H -HW' for more details.
--webhook
-X Halt on COM Error: Default True; If you have trouble with some files
not converting, set this to false to ignore errors and continue with
batch job.
--halterror
-V Show Versions. DocTo and Word/Excel/Powerpoint
Long Parameters:
--BookmarkSource
PDF conversions can take their bookmarks from
WordBookmarks, WordHeadings (default) or None
--DoNotOverwrite
--no-overwrite
Existing files are overridden by default, if you do not wish a file to be
over written use this option.
--no-subdirs Only convert specified directory. Do not recurse sub directories
--ExportMarkup Value for wdExportItem - default wdExportDocumentContent.
use wdExportDocumentWithMarkup to export all word comments with pdf
--no-IncludeDocProperties
--no-DocProp
Do not include Document Properties in the exported pdf file.
--PDF-OpenAfterExport
If you wish for a converted PDF to be opened after creation. No value req.
--PDF-FromPage
Save a range of pages to pdf. Integer/String. If integer --PDF-ToPage must also be set.
Other values wdExportCurrentPage, wdExportSelection
--PDF-ToPage
Save a range of pages to pdf. Integer. --PDF-FromPage must also be set.
--PDF-OptimizeFor
Set the pdf/xps to be optimized for print or screen.
Default ForPrint | ForOnScreen
--XPS-no-IRM
Do not copy IRM permissions to exported XPS document.
--PDF-No-DocStructureTags
Do not include DocStructureTags to help screen readers.
--PDF-no-BitmapMissingFonts
Do not bitmap missing fonts, fonts will be substituted.
--use-ISO190051
Create PDF to the ISO 19005-1 standard.
Experimental:
--skipdocswithtoc
EXPERIMENTAL. Will skip any docs that contain a TOC to prevent hanging.
Currently matches some false positives. Default False.
--stdout
Send file to Stdout after conversion. ( Does not work correctly for binary files)
ERROR CODES:
200 : Invalid File Format specified
201 : Insufficient Inputs. Minimum of Input File, Output File & Type
202 : Incorrect switches. Switch requires value
203 : Unknown switch in command
204 : Input File does not exist
205 : Invalid Parameter Value
220 : Word or COM Error
221 : Word not Installed
400 : Unknown Error
3つのパラメーターが必要です
値を取るパラメーターには、値からそれらを分離するスペースがあります。一部のパラメーターは値を必要としません。すべてのパラメーターは、ケースの鈍感です。
-f - inputfile
Doctoを開いてほしいファイルまたはフォルダー。フォルダーの場合、Doctoはそのディレクトリとそのサブディレクトリにすべてのファイルをロードします。サブディレクトリからファイルをロードしたくない場合は--no-subdirsパラメーターを参照してください。
変換は各ファイルで順番に実行されます。
-o -outputfile
出力ファイルを配置したいファイル名またはfoldername。入力がファイルであるが、出力がフォルダーである場合、出力ファイルは入力と同じ名前を持ち、新しい拡張子を使用します。
-t-フォーマット
wdFormatPDFやwdFormatTextなどに変換する形式を指定します。
可能な単語形式とExcel形式を表示します。整数値を使用することもできます
-H、 - ヘルプ
DoctoおよびOfficeアプリケーションのすべてのパラメーターとバージョンをリストするヘルプテキストを表示する
-v-バージョン
DoctoとMicrosoft Officeの両方のバージョン文字列を表示します。
-WD -XL -PP -VS
このパラメーターは、歴史的な理由でドキュメントをロードおよび保存するために使用したいアプリケーションをDoctoに指示します。
-fx - Inputextension
デフォルトでは、Doctoは標準のアプリケーション拡張機能でディレクトリにすべてのファイルをロードします
例えば。
ファイルの異なるセットを変換する場合、例えば *.rtfまたは *.txt .rtfなどのextでここで指定できます
-ox -outputextension
コンバージョンの出力拡張機能は、例えば標準リストから引き出されます。 wdformatpdfに変換する場合、ファイルはextension .pdfで出力されます。独自の拡張機能( .pdfxなど)を指定したい場合は、このパラメーターを使用できます。
-tf -forceformat
-tが整数である場合、Doctoがコンパイルされたときに利用できなかった値である場合、エラーが発生します。 -TFを使用する場合、チェックせずに-tの整数値をオフィスアプリケーションに渡します。
-l -loglevel
ログ出力のセットレベル。 -l 10はデバッグに役立ちます。 -l 0または-qを使用してロギングを補完します。
####レベル
-C - 適合性
互換モード整数。 MSDNリストから整数値に設定します。
ドキュメントを互換性のあるWordのバージョンの互換性モードを設定します。古いドキュメントを現在のバージョンに変換したい場合に特に便利です。 OneDriveと互換性がある古い単語文書を変換するために使用できます。
-e-エンコード
コードページエンコーディングを設定します。詳細と値については、MSDNを参照してください。
-n - listlongrunning
変換された場合の一部のファイルは、ダイアログボックスをポップアップする可能性があります。これは、手動介入によってのみ修正できます。このパラメーターを設定することにより、少なくとも難易度を引き起こしているドキュメントを( docto.ignore.txtというファイルに)記録でき、 -NXを設定した場合、これらのドキュメントはその後の実行時にスキップされます。
-NX -IGNORELONGRUNNINGLIST {no-value-Required}
docto.ignore.txtにリストされているファイルを設定すると、docto.exeと同じディレクトリでスキップされます。これにより、ディレクトリ構造内の厄介なドキュメントを無視できます。
-g -writelogfile [値は不要]
ログをファイルとstdoutに書き込みます。 docto.logデフォルトで。
-gl - logfilename {filename}
logfileを書き込みたいファイル名を指定します。
-Q -Quiet [値は不要]
stdoutへの出力はありません。エラーを含むすべてのものは延期されます。 -Gと組み合わせて使用して、エラーを確実に取得します。
-r - deletefiles {true | false}
コンバージョン後に入力ファイルを削除したい場合は、これをtrueに設定できます。
-w -webhook
希望する場合は、各変換またはエラーの後にWeb URLを呼び出すことができます。 Webhook URLは、次のパラメーターを使用して次のイベントで呼び出されます
ファイル変換
エラー
戻り値はDoctoログに記録されます
-x - halterror {true | false}
Doctoは、COMエラーが発生すると停止します。エラーを無視し、この値をtrueに設定し続ける場合。
-bookmarksource {source}
PDFコンバージョンは、ワードブックマーク、ワードヘッド(デフォルト)またはなしからブックマークを取得できます
-donotoverwrite--ノーオーバーワイト[値は不要]
ファイルを書き留めたくない場合は、既存のファイルがデフォルトでオーバーライドされます。このオプションを使用してください。
-No-SubDirs
デフォルトでは、サブディレクトリが変換されます。指定されたディレクトリのみを変換するために使用します。サブディレクトリを再発しないでください
-exportmarkup
指定します
wdexportdocumentwithmarkupを使用して、すべての単語コメントをPDFでエクスポートします
-PDF-Openafterexport
変換されたPDFを作成後に開くことを希望する場合。値はありません。
-PDF-FROPAGE
-PDF-TOPAGE
ドキュメント内の特定のページのみを変換します。
-USE-ISO190051
ISO 19005-1標準にPDFを作成します。これは、PDF-AまたはPDFアーカイブとしても知られています。
-m -ignoremacos {true | false}
デフォルトでは、Doctoは、Macosが作成する非表示の__MACOSXディレクトリ内のファイルを無視します。このディレクトリは、システム間で共有される外部ディスクに存在することがよくあります。この監督をチェックしたい場合は、この値を設定します。 eg -M false値を指定する必要があります。
プロジェクトはDelphiとコンパイルされます(10.3を使用しますが、XE4&7を含むほとんどのバージョンでコンパイルする必要があります)。プロジェクトは、comやwordやexcelなどの複数のWindowsのみのコンポーネントを使用しているため、Linuxにコンパイルされません。
XLSTOは現在、Doctoに組み込まれています。以前のXLSTOは、XLSファイルをCSVまたはPDFに変換するために使用された別のExeでした。これは、-XLフラグを追加するだけで、Main DocTo.exeで行うことができます。
誰もが提出したいと思うPRを受け入れることができてうれしいです。大量の作業が関与している場合は、最初に問題を開いて、努力が無駄にならないようにしてください。
リポジトリのメインブランチ名はDocToです
アプリケーションがドキュメントを正しく操作しているかどうかを確認するために、PHPで機能テストを書き始めました。 PHP LaravelとPestに精通している場合は、追加のテストが大好きです。