This file contains hidden or 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 groupdocs.viewer as gv | |
import groupdocs.viewer.options as gvo | |
# Load the DOCX from the file path. | |
with gv.Viewer("./input.docx") as viewer: | |
# Create JPG view options | |
viewOptions = gvo.JpgViewOptions("output_{0}.jpg") | |
# Render the document's pages to JPG images | |
viewer.view(viewOptions) | |
This file contains hidden or 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 groupdocs.viewer as gv | |
import groupdocs.viewer.options as gvo | |
# Load the DOCX from the file path. | |
with gv.Viewer("./SampleFiles/sample.docx") as viewer: | |
# Create PNG view options | |
viewOptions = gvo.PngViewOptions("output_{0}.png") | |
# Render the document's pages to PNG images | |
viewer.view(viewOptions) | |
This file contains hidden or 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 groupdocs.viewer as gv | |
import groupdocs.viewer.options as gvo | |
# Load the DOCX from the file path. | |
with gv.Viewer("./input.docx") as viewer: | |
# Create Image view options | |
viewOptions = gvo.PngViewOptions("output_{0}.png") | |
# Render the document into a set of PNG images | |
viewer.view(viewOptions) | |
This file contains hidden or 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 groupdocs.viewer as gv | |
import groupdocs.viewer.options as gvo | |
# Load the document from the file path. | |
with gv.Viewer("./input.docx") as viewer: | |
# Create HTML view options | |
viewOptions = gvo.HtmlViewOptions.for_embedded_resources("./page_{0}.html") | |
# Render the document to HTML | |
viewer.view(viewOptions) | |
This file contains hidden or 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 groupdocs.viewer as gv | |
import groupdocs.viewer.options as gvo | |
# Load the document from the file path. | |
with gv.Viewer("./input.docx") as viewer: | |
# Create PDF view options | |
viewOptions = gvo.PdfViewOptions("./output.pdf") | |
# Render the document to PDF | |
viewer.view(viewOptions) | |
This file contains hidden or 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 os | |
from groupdocs.conversion import Converter | |
from groupdocs.conversion.options.convert import PdfConvertOptions | |
# This code converts an RTF file to PDF format using GroupDocs.Conversion for Python. | |
# Load the source RTF file | |
converter = Converter("input.rtf") | |
# Set conversion options for PDF format | |
convert_options = PdfConvertOptions() |
This file contains hidden or 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 os | |
from groupdocs.conversion import Converter | |
from groupdocs.conversion.options.convert import WordProcessingConvertOptions | |
from groupdocs.conversion.filetypes import WordProcessingFileType | |
# This script converts an RTF file to TXT using GroupDocs.Conversion for Python. | |
# Load the source RTF file | |
converter = Converter("input.rtf") | |
# Set conversion options for TXT format |
This file contains hidden or 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 os | |
from groupdocs.conversion import Converter | |
from groupdocs.conversion.options.convert import WordProcessingConvertOptions | |
from groupdocs.conversion.filetypes import WordProcessingFileType | |
# This script converts an RTF file to DOCX using GroupDocs.Conversion for Python. | |
# Load the source RTF file | |
converter = Converter("input.rtf") | |
# Set conversion options for DOCX format |
This file contains hidden or 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 os | |
from groupdocs.conversion import Converter | |
from groupdocs.conversion.options.convert import ImageConvertOptions | |
from groupdocs.conversion.filetypes import ImageFileType | |
# This code converts an HTML to Image format using GroupDocs.Conversion for Python. | |
# Ensure you have the GroupDocs.Conversion library installed | |
# Load the source HTML file | |
converter = Converter("input.html") |
This file contains hidden or 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 os | |
from groupdocs.conversion import Converter | |
from groupdocs.conversion.options.convert import WebConvertOptions | |
from groupdocs.conversion.filetypes import WebFileType | |
# This code converts an HTML to MHTML format using GroupDocs.Conversion for Python. | |
# Load the source HTML file | |
converter = Converter("input.html") | |
# Set conversion options for HTML format |
NewerOlder