ยูทิลิตี้ง่าย ๆ สำหรับการแปลงเอกสาร Microsoft Word '.doc', Microsoft Excel '.xls' และ Microsoft PowerPoint .ppt ไฟล์ไปยังรูปแบบอื่น ๆ ที่รองรับเช่น. txt .csv .rtf .pdf
ยังสามารถใช้ในการแปลง. txt, .rtf, .csv เป็น. doc, .xls หรือ. pdf
สามารถใช้ในการแปลงเอกสารคำเก่าเป็นรูปแบบล่าสุด
ต้องมี Microsoft Word, Excel หรือ PowerPoint บนเครื่องโฮสต์
ดาวน์โหลดรีลีสจาก GitHub releases - https://github.com/tobya/docto/releases/ ข้อมูลเพิ่มเติมที่ https://tobya.github.io/docto/
ตัวอย่างเพิ่มเติมที่มีอยู่ที่
ดาวน์โหลด. exe จาก release https://github.com/tobya/docto/releases
นอกจากนี้ยังมีให้สำหรับการติดตั้งผ่านช็อคโกแลต
choco ติดตั้ง docto
เพื่ออัปเกรดเป็นเวอร์ชันล่าสุด
choco upgrade docto
wrappers โหนดถูกสร้างขึ้นโดย @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 ทั้งหมดในไดเรกทอรีและไดเรกทอรีย่อยเป็น PDF
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 เป็นการทดลองดังนั้นบันทึกปัญหาหากคุณมีปัญหาใด ๆ
หากคุณใช้ Docto in the Wild ที่ไหนสักแห่งโปรดเพิ่มรายละเอียดลงในหน้าวิกินี้
หากคุณต้องการอัพเกรดไฟล์จำนวนมากเพื่อทำงานโดยไม่ต้องแปลงบน OneDrive / Office365 / Word 20XX คุณสามารถใช้ Docto ได้ ดูคำถาม 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
ชื่อไฟล์หรือชื่อพับที่คุณต้องการวางไฟล์เอาต์พุต หากอินพุตเป็นไฟล์ แต่เอาต์พุตเป็นโฟลเดอร์ไฟล์เอาต์พุตจะมีชื่อเดียวกับอินพุต แต่มีส่วนขยายใหม่
-t -format
ระบุรูปแบบที่คุณต้องการแปลงเป็นเช่น wdFormatPDF หรือ wdFormatText ฯลฯ
ดูรูปแบบคำที่เป็นไปได้และรูปแบบ Excel ยังสามารถใช้ค่าจำนวนเต็ม
-h, -help
แสดงข้อความช่วยเหลือที่แสดงรายการพารามิเตอร์และแอปพลิเคชัน Docto และ Office ทั้งหมดทั้งหมด
-v -เวอร์ชัน
แสดงสตริงเวอร์ชันของทั้ง Docto และ Microsoft Office
-wd -xl -pp -vs
พารามิเตอร์นี้จะบอก Docto ว่าแอปพลิเคชันใดที่คุณต้องการใช้ในการโหลดและบันทึกเอกสารของคุณด้วยเหตุผลทางประวัติศาสตร์ Docto Defaults ถึง -WD หากไม่มีค่าใด ๆ
-fx -ผู้แทน
โดยค่าเริ่มต้น Docto จะโหลดไฟล์ทั้งหมดในไดเรกทอรีด้วยส่วนขยายแอปพลิเคชันมาตรฐาน
เช่น
หากคุณต้องการแปลงชุดไฟล์ที่แตกต่างกันเช่น *.rtf หรือ *.txt คุณสามารถระบุได้ที่นี่โดย ext เช่น .rtf
-OX -OUTPUTEXTENSION
ส่วนขยายเอาต์พุตของการแปลงจะถูกดึงจากรายการมาตรฐานเช่น หากแปลงเป็น wdformatpdf ไฟล์จะถูกส่งออกด้วยส่วนขยาย .pdf หากคุณต้องการระบุส่วนขยายของคุณเอง (เช่น .pdfx ) คุณสามารถทำได้ด้วยพารามิเตอร์นี้
-tf -ForceFormat
ถ้า -t เป็นจำนวนเต็มถ้าเป็นค่าที่ไม่สามารถใช้ได้เมื่อรวบรวม Docto มันจะทำให้เกิดข้อผิดพลาด หากคุณใช้ -TF มันจะผ่านค่าจำนวนเต็ม -t ไปยังแอปพลิเคชัน Office โดยไม่ต้องตรวจสอบ
-l -Loglevel
ตั้งค่าระดับของเอาต์พุตบันทึก -l 10 มีประโยชน์สำหรับการดีบัก ใช้ -l 0 หรือ -Q เพื่อตัดการบันทึก
ระดับ ####
-c -ความเข้ากันได้
จำนวนเต็มโหมดความเข้ากันได้ ตั้งค่าเป็นค่าจำนวนเต็มจากรายการ MSDN
ตั้งค่าโหมดความเข้ากันได้ของเวอร์ชันของคำว่าเอกสารจะเข้ากันได้กับ มีประโยชน์อย่างมากเมื่อต้องการแปลงเอกสารเก่าเป็นเวอร์ชันปัจจุบัน สามารถใช้ในการแปลงเอกสารคำเก่าให้เข้ากันได้กับ OneDrive
-e -การเข้ารหัส
ตั้งค่าการเข้ารหัส CodePage ดู 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}
หากคุณต้องการให้อินพุตไฟล์ถูกลบหลังจากการแปลงคุณสามารถตั้งค่าเป็นจริงได้
-w -Webhook
หากคุณต้องการคุณสามารถโทรหา URL เว็บหลังจากการแปลงหรือข้อผิดพลาดแต่ละครั้ง URL WebHook จะถูกเรียกใช้เหตุการณ์ต่อไปนี้ด้วยพารามิเตอร์ต่อไปนี้
การแปลงไฟล์
ข้อผิดพลาด
ค่าส่งคืนถูกบันทึกไว้ในบันทึก Docto
-x --halterror {true | false}
Docto จะหยุดเมื่อมีข้อผิดพลาดเกิดขึ้น หากคุณต้องการเพิกเฉยต่อข้อผิดพลาดและตั้งค่าค่านี้ให้เป็นจริง
-bookmarksource {source}
การแปลง PDF สามารถนำบุ๊กมาร์กจาก WordBookMarks, WordHeadings (ค่าเริ่มต้น) หรือไม่มีเลย
-DONOTOVERWRITE-NO-OVERWRITE [ไม่จำเป็นต้องมีค่า]
ไฟล์ที่มีอยู่จะถูกแทนที่โดยค่าเริ่มต้นหากคุณไม่ต้องการให้ไฟล์เป็นลายลักษณ์อักษรใช้ตัวเลือกนี้
-ไม่มีน้ำใจ
โดยเริ่มต้นไดเรกทอรีย่อยเริ่มต้น ใช้เพื่อแปลงเฉพาะไดเรกทอรีที่ระบุ อย่ากลับมาใหม่ไดเรกทอรีย่อย
-exportarkup
ระบุ
ใช้ wdexportDocumentWithMarkup เพื่อส่งออกความคิดเห็นคำทั้งหมดด้วย PDF
-PDF-OpenafterExport
หากคุณต้องการเปิด PDF ที่แปลงแล้วหลังจากการสร้าง ไม่มีค่า req
-pdf-frompage
-pdf-topage
แปลงเฉพาะบางหน้าในเอกสาร
-การใช้งาน-ISO190051
สร้าง PDF ตามมาตรฐาน ISO 19005-1 และยังรู้ว่าเป็น PDF-A หรือ PDF Archive
-m -ignoremacos {true | false}
โดยค่าเริ่มต้น Docto จะละเว้นไฟล์ใด ๆ ในไดเรกทอรี __MACOSX ที่ซ่อนอยู่ที่ MACOS สร้างขึ้น ไดเรกทอรีนี้มักจะปรากฏบนดิสก์ภายนอกที่ใช้ร่วมกันระหว่างระบบ หากคุณต้องการตรวจสอบ DIR นี้ตั้งค่านี้ คุณต้องระบุค่าเช่น -M false
โครงการรวบรวมด้วย Delphi (ฉันใช้ 10.3 แต่ควรรวบรวมด้วยเวอร์ชันส่วนใหญ่รวมถึง XE4 & 7) โครงการจะไม่รวบรวมบน Linux เนื่องจากใช้ส่วนประกอบของ Windows หลายส่วนเช่น COM และ Word และ Excel ไม่มีเวอร์ชัน Linux อยู่ดีดังนั้นจะไม่มีประเด็น
ตอนนี้ XLSTO ถูกรวมเข้ากับ Docto ก่อนหน้านี้ XLSTO เป็น EXE แยกที่ใช้ในการแปลงไฟล์ XLS เป็น CSV หรือ PDF ตอนนี้สามารถทำได้ด้วย Main DocTo.exe โดยเพียงแค่เพิ่มค่าสถานะ -xl
ฉันยินดีที่จะยอมรับการประชาสัมพันธ์ใด ๆ ที่ทุกคนอาจต้องการส่ง หากมีงานจำนวนมากที่เกี่ยวข้องโปรดเปิดปัญหาก่อนเพื่อให้แน่ใจว่าความพยายามจะไม่สูญเปล่า
ชื่อสาขาหลักใน repo คือ DocTo
ฉันเริ่มเขียนการทดสอบการทำงานใน PHP เพื่อตรวจสอบว่าแอปพลิเคชันกำลังจัดการเอกสารอย่างถูกต้องหรือไม่ หากคุณคุ้นเคยกับ PHP Laravel และศัตรูพืชฉันจะชอบการทดสอบเพิ่มเติม