GroupDocs.Editor 클라우드 제품군

클라우드 개발자를 위한 또 다른 희소식! GroupDocs는 문서 편집 클라우드 API를 출시했습니다. 이것은 GroupDocs의 문서 편집 솔루션을 향상시킵니다. 이 솔루션은 이미 .NET 및 Java 개발자를 위해 온프레미스 API크로스 플랫폼 온라인 앱으로 존재하여 모든 종류의 사용자가 온라인에서 무료로 문서를 편집할 수 있습니다. SDK와 함께 GroupDocs.Editor Cloud API를 사용하면 개발자가 추가 애플리케이션 없이 프런트 엔드 WYSIWYG 편집기를 사용하여 널리 사용되는 대부분의 문서 형식을 편집할 수 있습니다.

GroupDocs.Editor Cloud는 다양한 문서 유형의 편집 프로세스를 사용자 정의하기 위해 많은 편집 옵션 및 출력 사용자 정의를 제공하는 REST API입니다. 주요 기능 중 일부는 다음과 같습니다.

  • 흐름 또는 페이징 모드에서 워드 프로세싱 문서를 편집합니다.
  • 동일한 사용자 경험을 제공하기 위해 글꼴 추출을 관리합니다.
  • 대용량 파일의 메모리 사용량 최적화.
  • 다중 탭 스프레드시트 지원.
  • 유연한 숫자 및 날짜 변환.
  • URI 및 이메일 주소 인식.

기능과 제품에 대한 더 나은 아이디어를 얻으려면 언제든지 문서 섹션의 개발자 가이드를 방문할 수 있습니다.

지원되는 문서 유형

다음은 현재 지원되는 문서 형식입니다. 언제든지 GroupDocs.Editor Cloud 문서를 방문하여 모든 지원되는 문서 형식에 대해 알아볼 수 있습니다.

SDK 및 샘플

클라우드용 문서 편집 REST API와 함께 GroupDocs는 오픈 소스 SDK도 제공하므로 요구 사항에 따라 자체 사용자 정의할 수 있습니다. 개발자는 cURL을 사용하여 GroupDocs.Editor Cloud API와 상호 작용할 수 있으며 관련 SDK를 사용하여 개발 속도를 높일 수도 있습니다. 이를 통해 개발자는 요청을 만들고 응답을 처리하는 낮은 수준의 세부 정보에 대해 걱정하지 않아도 됩니다. 코드 예제와 함께 아래에 언급된 SDK는 GitHub에서 사용 가능:

C#에서 Word 문서 편집

여기에서 GroupDocs.Editor Cloud SDK for .NET을 사용하여 워드 문서를 편집하는 C# 코드 예제를 볼 수 있습니다. 사용 가능한 관련 SDK를 사용하여 Java, PHP, Python, Ruby 및 Node.js에서도 동일한 작업을 쉽게 수행할 수 있습니다. 이것은 단순히 원본 문서를 HTML 형식으로 변환하고 편집할 수 있도록 하며 나중에 업데이트된 문서를 원래 형식으로 다시 변환합니다.

// 전체 예제 및 데이터 파일을 보려면 https://github.com/groupdocs-editor-cloud/groupdocs-editor-cloud-dotnet-samples로 이동하세요.
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
  
var configuration = new Configuration(MyAppSid, MyAppKey);
 
// 필요한 API 인스턴스 생성
var editApi = new EditApi(configuration );
var fileApi = new FileApi(configuration );
 
// 문서가 이미 저장소에 업로드되었습니다.
// 편집 가능한 상태로 로드
var loadOptions = new WordProcessingLoadOptions
{
    FileInfo = new FileInfo
    {
        FilePath = "WordProcessing/password-protected.docx",
        Password = "password"
    },
    OutputPath = "output"
};
var loadResult = editApi.Load(new LoadRequest(loadOptions));
 
// HTML 문서 다운로드
var stream = fileApi.DownloadFile(new DownloadFileRequest(loadResult.HtmlPath));
var htmlString = new StreamReader(stream, Encoding.UTF8).ReadToEnd();
 
// 수정...
htmlString = htmlString.Replace("Sample test text", "Hello world");
 
// html을 저장소에 다시 업로드
fileApi.UploadFile(new UploadFileRequest(loadResult.HtmlPath,
    new MemoryStream(Encoding.UTF8.GetBytes(htmlString))));
 
// html을 다시 docx에 저장
var saveOptions = new WordProcessingSaveOptions
{
    FileInfo = loadOptions.FileInfo,
    OutputPath = "output/edited.docx",
    HtmlPath = loadResult.HtmlPath,
    ResourcesPath = loadResult.ResourcesPath
};
var saveResult = editApi.Save(new SaveRequest(saveOptions));

Java에서 Excel 스프레드시트 문서 업데이트

다음은 GroupDocs.Editor Java용 Cloud SDK를 사용하여 Java 애플리케이션에서 스프레드시트 문서를 빠르게 편집하는 방법을 보여주는 코드 스니펫입니다.

// 전체 예제 및 데이터 파일을 보려면 https://github.com/groupdocs-editor-cloud/groupdocs-editor-cloud-java-samples로 이동하십시오.
String MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
String MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
  
Configuration configuration = new Configuration(MyAppSid, MyAppKey);
 
 
// 필요한 API 인스턴스 생성
EditApi editApi = new EditApi(configuration);
FileApi fileApi = new FileApi(configuration);
 
// 문서가 이미 저장소에 업로드되었습니다.
// 편집 가능한 상태로 로드
FileInfo fileInfo = new FileInfo();
fileInfo.setFilePath("Spreadsheet/four-sheets.xlsx");           
SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
loadOptions.setFileInfo(fileInfo);
loadOptions.setOutputPath("output");
LoadResult loadResult = editApi.load(new LoadRequest(loadOptions));
 
// HTML 문서 다운로드
File file = fileApi.downloadFile(new DownloadFileRequest(loadResult.getHtmlPath(), null, null));
             
// 수정...
List<String> lines = Files.readAllLines(file.toPath());
List<String> newLines = new ArrayList<String>();
for (String line : lines) {
    newLines.add(line.replaceAll("This is sample sheet", "This is sample sheep"));
}
Files.write(file.toPath(), newLines);
 
// html을 저장소에 다시 업로드
fileApi.uploadFile(new UploadFileRequest(loadResult.getHtmlPath(), file, Common.MYStorage));
 
// html을 다시 xlsx에 저장
SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
saveOptions.setFileInfo(fileInfo);
saveOptions.setOutputPath("output/edited.xlsx");    
saveOptions.setHtmlPath(loadResult.getHtmlPath());      
saveOptions.setResourcesPath(loadResult.getResourcesPath());
DocumentResult saveResult = editApi.save(new SaveRequest(saveOptions));
 
System.out.println("Document edited: " + saveResult.getPath());

Python에서 프레젠테이션 편집

다음은 Python에서 PowerPoint 또는 OpenDocument 프레젠테이션을 편집하는 방법을 보여주는 코드 예제입니다.

# 전체 예제 및 데이터 파일을 보려면 https://github.com/groupdocs-editor-cloud/groupdocs-editor-cloud-python-samples로 이동하십시오.
import groupdocs_editor_cloud
 
app_sid = "XXXX-XXXX-XXXX-XXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
app_key = "XXXXXXXXXXXXXXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
  
editApi = groupdocs_editor_cloud.EditApi.from_keys(app_sid, app_key)
fileApi = groupdocs_editor_cloud.FileApi.from_keys(app_sid, app_key)
 
# 문서가 이미 저장소에 업로드되었습니다.
# 편집 가능한 상태로 로드
fileInfo = groupdocs_editor_cloud.FileInfo("Presentation/with-notes.pptx")
loadOptions = groupdocs_editor_cloud.PresentationLoadOptions()
loadOptions.file_info = fileInfo
loadOptions.output_path = "output"
loadOptions.slide_number = 0
loadResult = editApi.load(groupdocs_editor_cloud.LoadRequest(loadOptions))        
 
# HTML 문서 다운로드
htmlFile = fileApi.download_file(groupdocs_editor_cloud.DownloadFileRequest(loadResult.html_path))
html = ""       
with open(htmlFile, 'r') as file:
    html = file.read()
 
# 수정...    
html = html.replace("Slide sub-heading", "Hello world!")
 
# html을 저장소에 다시 업로드
with open(htmlFile, 'w') as file:
    file.write(html)
 
fileApi.upload_file(groupdocs_editor_cloud.UploadFileRequest(loadResult.html_path, htmlFile))
 
# html을 pptx에 다시 저장
saveOptions = groupdocs_editor_cloud.PresentationSaveOptions()
saveOptions.file_info = fileInfo
saveOptions.output_path = "output/edited.pptx"
saveOptions.html_path = loadResult.html_path
saveOptions.resources_path = loadResult.resources_path
saveResult = editApi.save(groupdocs_editor_cloud.SaveRequest(saveOptions))
 
# 완료
print("Document edited: " + saveResult.path)

자원

다음은 관련 리소스에 대한 몇 가지 중요한 링크입니다.

Document Editing Cloud API에 대해 여기에서 만나서 반갑습니다. 어려움을 느끼거나 혼란이 있거나 좋은 제안을 제공하는 경우 포럼에서 자유롭게 문의할 수 있습니다. 감사해요.