This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.groupdocs.conversion.Converter; | |
import com.groupdocs.conversion.options.convert.PdfConvertOptions; | |
... | |
// Convert Word document (DOC/DOCX) to PDF in Java | |
Converter converter = new Converter("path/document.docx"); | |
converter.convert("path/converted-docx-to-pdf.pdf", new PdfConvertOptions()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using GroupDocs.Conversion.Options.Convert; | |
... | |
// Convert Word document (DOC/DOCX) to PDF using C# | |
using (var converter = new Converter("path/document.docx")) | |
{ | |
// Save the converted file in PDF format. | |
converter.Convert("path/converted-docx-to-pdf.pdf", new PdfConvertOptions()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extract Images from the loaded file | |
Iterable<PageImageArea> images = parser.getImages(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Combine all sheets of two or more Excel files in Java | |
Merger merger = new Merger("/path/spreadsheet-1.xlsx"); | |
merger.join("/path/spreadsheet-2.xlsx"); | |
merger.join("/path/spreadsheet-3.xlsx"); | |
merger.save("/path/merged-spreadsheet.xlsx"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Combine all sheets of two or more Excel files using C# | |
using (Merger merger = new Merger("/path/spreadsheet-1.xlsx")) | |
{ | |
merger.Join("/path/spreadsheet-2.xlsx"); | |
merger.Join("/path/spreadsheet-3.xlsx"); | |
merger.Save("/path/merged-spreadsheet.xlsx"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Combine all the slides of provided 2 or more presentations in Java | |
Merger merger = new Merger("/path/presentation-1.pptx"); | |
merger.join("/path/presentation-2.pptx"); | |
merger.join("/path/presentation-3.pptx"); | |
merger.save("/path/merged-presentation.pptx"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Combine all the slides of provided 2 or more presentations using C# | |
using (Merger merger = new Merger("/path/presentation-1.pptx")) | |
{ | |
merger.Join("/path/presentation-2.pptx"); | |
merger.Join("/path/presentation-3.pptx"); | |
merger.Save("/path/merged-presentation.pptx"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileWriter; | |
import java.io.IOException; | |
import com.groupdocs.parser.Parser; | |
import com.groupdocs.parser.data.*; | |
import com.groupdocs.parser.options.*; | |
... | |
... | |
try (Parser parser = new Parser("/path/document.docx")) { | |
try (TextReader reader = parser.getFormattedText(new FormattedTextOptions(FormattedTextMode.Markdown))) { | |
String content = reader.readToEnd(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using GroupDocs.Parser.Options; | |
... | |
... | |
using (Parser parser = new Parser("/path/document.docx")) | |
{ | |
using (TextReader reader = parser.GetFormattedText(new FormattedTextOptions(FormattedTextMode.Markdown))) | |
{ | |
string content = reader.ReadToEnd(); | |
using (TextWriter textWriter = File.CreateText("/path/word-to-markdown.md")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extract whole Text of Markdown file in Java | |
try (Parser parser = new Parser("/path/document.md")) | |
{ | |
TextReader reader = parser.getText() | |
System.out.println(reader.readToEnd()); | |
} |