EPS를 PDF로

C++용 API 솔루션을 통해 EPS를 PDF로 변환하세요.

 

EPS 파일은 Adobe Acrobat, Adobe Illustrator, Adobe InDesign, Adobe Photoshop(이후 버전), Inkscape, GIMP 등 다양한 그래픽 편집기에서 열고 편집할 수 있습니다. 또한 Aspose.Page Viewer와 같은 일부 웹 솔루션을 통해 파일 내용을 볼 수 있습니다. 하지만 많은 사용자는 EPS 파일을 더 널리 지원되는 형식으로 변환하는 것이 더 편리하다고 생각합니다. Aspose.Page for C++는 EPS(Encapsulated PostScript) 파일을 PDF와 같은 다양한 형식으로 변환하는 강력하고 효율적인 솔루션을 제공합니다.

이 API는 C++ 개발자가 EPS 파일 변환 기능을 애플리케이션에 원활하게 통합하여 워크플로를 간소화하고 문서 처리 기능을 향상시킬 수 있도록 지원합니다.

EPS를 PDF로 변환하려면:

  • Aspose.Page for C++ API는 기능이 풍부하고 강력하며 사용하기 쉬운 C++ 플랫폼용 문서 조작 및 변환 API입니다.

  • 최신 버전을 직접 다운로드하고 NuGet 패키지 관리자를 열고 Aspose.Page.Cpp를 검색하여 설치할 수 있습니다. 패키지 관리자 콘솔에서 다음 명령을 사용할 수도 있습니다.

Package Manager Console Command


    PM> Install-Package Aspose.Page.Cpp

C++를 사용하여 EPS를 PDF로 변환하는 단계

Aspose.Page를 사용하면 개발자가 단 몇 줄의 코드만으로 EPS 파일을 쉽게 로드하고 PDF로 변환할 수 있습니다.

  1. C++용 Aspose.Page를 사용하여 EPS 파일을 로드합니다.
  2. PdfSaveOptions 클래스 객체를 생성하여 AnotherFontsFolder 및 SuppressError 값 등과 같은 추가 설정을 정의합니다.
  3. PDF 파일 변환을 위해서는 SaveAsPdf 메소드를 호출하세요.
  4. 필요한 경우 오류를 처리합니다.
이 코드 샘플은 EPS를 PDF C++로 변환하는 방법을 설명합니다.
    // The path to the documents directory.
    System::String dataDir = RunExamples::GetDataDir_WorkingWithDocumentConversion();
    
    // Initialize PsDocument with the name of PostScript file.
    System::SharedPtr<PsDocument> document = System::MakeObject<PsDocument>(dataDir + u"input.eps");
    
    // If you want to convert Postscript file despite of minor errors set this flag
    bool suppressErrors = true;
    
    //Initialize options object with necessary parameters.
    System::SharedPtr<PdfSaveOptions> options = System::MakeObject<PdfSaveOptions>(suppressErrors);
    // If you want to add special folder where fonts are stored. Default fonts folder in OS is always included.
    options->set_AdditionalFontsFolders(System::MakeArray<System::String>({u"{FONT_FOLDER}"}));
    // Default page size is 595x842 and it is not mandatory to set it in PdfSaveOptions
    // But if you need to specify sizeuse following line
    //PdfSaveOptions options = new PdfSaveOptions(suppressErrorsnew, Aspose.Page.Drawing.Size(595x842));
    // or
    //saveOptions.Size = new Aspose.Page.Drawing.Size(595x842);
    
    // Save document as PDF
    document->SaveAsPdf(dataDir + u"outputPDF_out.pdf", options);
    
    //Review errors
    if (suppressErrors)
    {
        for (auto&& ex : System::IterateOver(options->get_Exceptions()))
        {
            System::Console::WriteLine(ex->get_Message());
        }
    }

EPS What is EPS File Format

EPS (Encapsulated PostScript) は、単一ページのレイアウトを記述する PostScript ベースのフォーマットです。ベクター画像やベクター‑ラスタ混合画像に最適で、インポート後は編集できないため、SVG や PDF など編集可能な形式に変換して使用します。

PDF What is PDF File Format

PDF (Portable Document Format) は、テキスト・ベクタ・ラスタ画像・マルチメディアを含むオープンなマルチプラットフォーム形式です。ほぼすべてのデバイスで閲覧可能です。