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
| ### Keybase proof | |
| I hereby claim: | |
| * I am orrjosh on github. | |
| * I am orrjosh (https://keybase.io/orrjosh) on keybase. | |
| * I have a public key ASBPLWsLeDEWSzrigKW1r7o_vOHia26gyT6NQ-UW9JFXBgo | |
| To claim this, I am signing this object: |
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
| public File convert(final File file) throws IOException, UnsupportedFileException { | |
| File convertedFile = null; | |
| InputStream in = null; | |
| try { | |
| Dictionary<String, SaveOptions> availableConversions = getSaveOptions(file); | |
| SaveOptions saveOptions = availableConversions.get("pdf"); | |
| if (saveOptions != null) { | |
| in = new BufferedInputStream(new FileInputStream(file)); | |
| logger.debug("Starting conversion of: " + file.getName() + " to PDF"); | |
| saveOptions.setOutputType(OutputType.String); |
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
| package com.instructure.knightrider.converters; | |
| import com.amazonaws.util.Base64; | |
| import com.groupdocs.conversion.License; | |
| import com.groupdocs.conversion.converter.option.LoadOptions; | |
| import com.groupdocs.conversion.converter.option.OutputType; | |
| import com.groupdocs.conversion.converter.option.SaveOptions; | |
| import com.groupdocs.conversion.handler.ConversionHandler; | |
| import com.groupdocs.foundation.exception.GroupDocsException; | |
| import org.apache.commons.io.IOUtils; |