Skip to content

Releases: aspose-pdf-foss/Aspose.PDF-FOSS-for-Cpp

Aspose.PDF FOSS for C++ 1.0.1

Choose a tag to compare

@github-actions github-actions released this 30 Sep 13:54

Aspose.PDF FOSS for C++ 1.0.1 is a free, open-source, MIT-licensed C++20 library for working
with PDF documents. It can open, render, edit, and create PDFs, and it links against nothing but
the C++ standard library. Every codec and the page rasteriser are implemented from scratch. The
public API is a strict subset of Aspose.PDF for .NET, so class and method names will be familiar
to anyone migrating from .NET.

What's new in 1.0.1

  • NuGet package for Visual Studio. Aspose.PDF.Cpp.FOSS
    ships static libraries for x64, x86, and ARM64, in Release (/MD) and Debug (/MDd). It adds
    the include path, links the matching library, and raises the project to C++20. Install it and
    write #include <aspose.pdf.foss.hpp>.
  • Self-contained Debug libraries. The Debug library in the Windows zip, and the Debug libraries
    in the NuGet package, now embed their debug information (/Z7). Linking them no longer produces
    LNK4099 "PDB not found" warnings.

The library code and public API are unchanged from 1.0.0.

Highlights

  • Open, edit, and save PDFs. Byte-verbatim round-trips, incremental /Info metadata updates,
    and password-protected files (Document(path, password)).
  • Extract text. TextAbsorber covers a whole document or one page; TextFragmentAbsorber
    gives positioned fragments with font, size, and colour.
  • Render pages to PNG, JPEG, BMP, and TIFF with a built-in anti-aliased rasteriser. That
    includes multi-page TIFF and 1/4/8-bpp palettised output.
  • Create documents from scratch with positioned and wrapped text, tables, vector graphics
    (Line, Rectangle, Circle, Ellipse), images, and watermarks.
  • Annotations across 13 subtypes, each with a pre-generated appearance stream, plus
    AcroForm fields (text box, checkbox, radio button, combo box, list box, button) with
    Form::Flatten().
  • Security: RC4-40/128 and AES-128/256 encryption and decryption, and detached PKCS#7 digital
    signatures.
  • Navigation: outlines (bookmarks), named destinations, page labels, and embedded files.
  • Classic Facades API: PdfConverter, PdfExtractor, PdfFileEditor, PdfFileSecurity,
    PdfFileSignature, PdfFileStamp, PdfBookmarkEditor, FormEditor, and more.

The full list of changes is in CHANGELOG.md.

Downloads

Asset Platform Toolchain Contents
aspose-pdf-foss-cpp-1.0.1-linux-x64-gcc13.tar.gz Linux x86-64 GCC 13, libstdc++, built on Ubuntu 24.04 libaspose_pdf_foss.a (Release, position-independent)
aspose-pdf-foss-cpp-1.0.1-windows-x64-msvc.zip Windows x64 MSVC (Visual Studio 2022), dynamic CRT aspose_pdf_foss.lib (Release, /MD) and aspose_pdf_fossd.lib (Debug, /MDd)
Aspose.PDF.Cpp.FOSS.1.0.1.nupkg Windows x64, x86, ARM64 Visual Studio 2022+ (MSBuild) The NuGet package, also published on nuget.org
SHA256SUMS.txt — — SHA-256 checksums of the archives
Source code (zip / tar.gz) any any C++20 compiler Full source tree, generated by GitHub

Every archive contains:

  • include/: the public headers, including the single-entry header aspose.pdf.foss.hpp.
  • lib/: the static library and the CMake package files (lib/cmake/aspose_pdf_foss/).
  • share/doc/aspose_pdf_foss/: LICENSE, THIRD_PARTY_NOTICES.md, and the OFL 1.1 text for the
    bundled fonts.
  • README.md, CHANGELOG.md, and BUILDINFO.txt (exact compiler and commit used for the
    build).

Each archive was built, tested, and then compiled and run as a find_package consumer before it
was attached to this release. To verify a download:
sha256sum -c SHA256SUMS.txt --ignore-missing.

Getting started

Visual Studio (NuGet)

Install Aspose.PDF.Cpp.FOSS through
Manage NuGet Packages, or from the Package Manager Console:

Install-Package Aspose.PDF.Cpp.FOSS

The package adds the include path, links the library that matches your platform (x64, Win32, or
ARM64) and configuration, and raises the project to C++20. Your code only needs
#include <aspose.pdf.foss.hpp>.

From a release archive (CMake)

Extract the archive, then point CMake at it:

find_package(aspose_pdf_foss 1.0 CONFIG REQUIRED)
target_link_libraries(your_app PRIVATE aspose_pdf_foss::aspose_pdf_foss)
cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/aspose-pdf-foss-cpp-1.0.1-linux-x64-gcc13

The imported target switches your target to C++20 automatically. On Windows, CMake selects the
Release or Debug library to match your configuration.

From source (CMake subdirectory)

add_subdirectory(Aspose.PDF-FOSS-for-Cpp)
target_link_libraries(your_app PRIVATE aspose_pdf_foss::aspose_pdf_foss)

Building from source needs CMake 3.20+, a C++20 compiler (GCC 13+, Clang 16+, or MSVC 2022 17.5+),
and Python 3 at build time only.

Hello, PDF

#include <aspose.pdf.foss.hpp>
#include <fstream>
#include <iostream>

int main() {
    Aspose::Pdf::Document doc("input.pdf");
    std::cout << "Pages: " << doc.Pages().Count() << "\n";

    Aspose::Pdf::Text::TextAbsorber absorber;
    absorber.Visit(doc);
    std::cout << absorber.Text() << "\n";

    Aspose::Pdf::Devices::PngDevice png(Aspose::Pdf::Devices::Resolution(150));
    std::ofstream out("page1.png", std::ios::binary);
    png.Process(doc.Pages()[1], out);
}

The examples/
directory has 12 more runnable programs, including a 10-page from-scratch showcase.

Compatibility

  • Language: C++20. The public headers use C++20 standard-library features such as std::span.
  • Prebuilt Linux library: link with GCC 13 or newer, or with Clang against libstdc++ 13 or
    newer, on a system with glibc 2.39 or newer (Ubuntu 24.04 or later). For other distributions or
    toolchains, build from source.
  • Prebuilt Windows libraries (zip and NuGet): link with the same or a newer MSVC toolset,
    using the dynamic CRT (/MD for Release, /MDd for Debug). This is the CMake and Visual Studio
    default. Debug libraries carry embedded debug info, so no separate PDB is needed.
  • Runtime dependencies: none.

Known limitations

  • The XmpValue helpers IsDateTime, IsField, IsNamedValue, IsRaw, IsNamedValues, and
    IsStructure are stubs that always return false. Use IsString, IsInteger, IsDouble, and
    IsArray instead.
  • Standard-14 fallback fonts cover Helvetica, Times-Roman, and Courier (four styles each). Symbol
    and ZapfDingbats have no bundled fallback.
  • Setting metadata on a from-scratch document and then saving throws, because the incremental
    writer can only patch an existing /Info object.
  • Objects added to Paragraphs, Annotations, Form, Artifacts, and Outlines are stored by
    reference, so they must outlive Save().
  • Encryption permissions are enforced by PDF viewers; the library is not a DRM mechanism.

Aspose.PDF for C++ Enterprise Edition does not have these
limitations and covers a broader feature set.

Documentation and support

License

The library is released under the MIT License.
It compiles in the Liberation fonts, which are licensed under the SIL Open Font License 1.1, so
the SPDX expression for the distribution as a whole is MIT AND OFL-1.1. See
THIRD_PARTY_NOTICES.md.

Full Changelog: v1.0.0...v1.0.1

Initial release version 1.0.0

Choose a tag to compare

@AlexanderMalokhovetskiy AlexanderMalokhovetskiy released this 29 Sep 11:38

Aspose.PDF FOSS for C++ 1.0.0 is the first public release of a free, open-source, MIT-licensed
C++20 library for working with PDF documents. It can open, render, edit, and create PDFs, and it
links against nothing but the C++ standard library. Every codec and the page rasteriser are
implemented from scratch. The public API is a strict subset of Aspose.PDF for .NET, so class and
method names will be familiar to anyone migrating from .NET.

Highlights

  • Open, edit, and save PDFs. Byte-verbatim round-trips, incremental /Info metadata updates,
    and password-protected files (Document(path, password)).
  • Extract text. TextAbsorber covers a whole document or one page; TextFragmentAbsorber
    gives positioned fragments with font, size, and colour.
  • Render pages to PNG, JPEG, BMP, and TIFF with a built-in anti-aliased rasteriser. That
    includes multi-page TIFF and 1/4/8-bpp palettised output.
  • Create documents from scratch with positioned and wrapped text, tables, vector graphics
    (Line, Rectangle, Circle, Ellipse), images, and watermarks.
  • Annotations across 13 subtypes, each with a pre-generated appearance stream, plus
    AcroForm fields (text box, checkbox, radio button, combo box, list box, button) with
    Form::Flatten().
  • Security: RC4-40/128 and AES-128/256 encryption and decryption, and detached PKCS#7 digital
    signatures.
  • Navigation: outlines (bookmarks), named destinations, page labels, and embedded files.
  • Classic Facades API: PdfConverter, PdfExtractor, PdfFileEditor, PdfFileSecurity,
    PdfFileSignature, PdfFileStamp, PdfBookmarkEditor, FormEditor, and more.

The full list of changes is in CHANGELOG.md.

Downloads

Asset Platform Toolchain Contents
aspose-pdf-foss-cpp-1.0.0-linux-x64-gcc13.tar.gz Linux x86-64 GCC 13, libstdc++, built on Ubuntu 24.04 libaspose_pdf_foss.a (Release, position-independent)
aspose-pdf-foss-cpp-1.0.0-windows-x64-msvc.zip Windows x64 MSVC (Visual Studio 2022), dynamic CRT aspose_pdf_foss.lib (Release, /MD) and aspose_pdf_fossd.lib (Debug, /MDd)
SHA256SUMS.txt — — SHA-256 checksums of the archives
Source code (zip / tar.gz) any any C++20 compiler Full source tree, generated by GitHub

Every archive contains:

  • include/: the public headers, including the single-entry header aspose.pdf.foss.hpp.
  • lib/: the static library and the CMake package files (lib/cmake/aspose_pdf_foss/).
  • share/doc/aspose_pdf_foss/: LICENSE, THIRD_PARTY_NOTICES.md, and the OFL 1.1 text for the
    bundled fonts.
  • README.md, CHANGELOG.md, and BUILDINFO.txt (exact compiler and commit used for the
    build).

Each archive was built, tested, and then compiled and run as a find_package consumer before it
was attached to this release. To verify a download:
sha256sum -c SHA256SUMS.txt --ignore-missing.

Getting started

From a release archive (CMake)

Extract the archive, then point CMake at it:

find_package(aspose_pdf_foss 1.0 CONFIG REQUIRED)
target_link_libraries(your_app PRIVATE aspose_pdf_foss::aspose_pdf_foss)
cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/aspose-pdf-foss-cpp-1.0.0-linux-x64-gcc13

The imported target switches your target to C++20 automatically. On Windows, CMake selects the
Release or Debug library to match your configuration.

From source (CMake subdirectory)

add_subdirectory(Aspose.PDF-FOSS-for-Cpp)
target_link_libraries(your_app PRIVATE aspose_pdf_foss::aspose_pdf_foss)

Building from source needs CMake 3.20+, a C++20 compiler (GCC 13+, Clang 16+, or MSVC 2022 17.5+),
and Python 3 at build time only.

Hello, PDF

#include <aspose.pdf.foss.hpp>
#include <fstream>
#include <iostream>

int main() {
    Aspose::Pdf::Document doc("input.pdf");
    std::cout << "Pages: " << doc.Pages().Count() << "\n";

    Aspose::Pdf::Text::TextAbsorber absorber;
    absorber.Visit(doc);
    std::cout << absorber.Text() << "\n";

    Aspose::Pdf::Devices::PngDevice png(Aspose::Pdf::Devices::Resolution(150));
    std::ofstream out("page1.png", std::ios::binary);
    png.Process(doc.Pages()[1], out);
}

The examples/
directory has 12 more runnable programs, including a 10-page from-scratch showcase.

Compatibility

  • Language: C++20. The public headers use C++20 standard-library features such as std::span.
  • Prebuilt Linux library: link with GCC 13 or newer, or with Clang against libstdc++ 13 or
    newer, on a system with glibc 2.39 or newer (Ubuntu 24.04 or later). For other distributions or
    toolchains, build from source.
  • Prebuilt Windows library: link with the same or a newer MSVC toolset, using the dynamic CRT
    (/MD for Release, /MDd for Debug). This is the CMake default.
  • Runtime dependencies: none.

Known limitations

  • The XmpValue helpers IsDateTime, IsField, IsNamedValue, IsRaw, IsNamedValues, and
    IsStructure are stubs that always return false. Use IsString, IsInteger, IsDouble, and
    IsArray instead.
  • Standard-14 fallback fonts cover Helvetica, Times-Roman, and Courier (four styles each). Symbol
    and ZapfDingbats have no bundled fallback.
  • Setting metadata on a from-scratch document and then saving throws, because the incremental
    writer can only patch an existing /Info object.
  • Objects added to Paragraphs, Annotations, Form, Artifacts, and Outlines are stored by
    reference, so they must outlive Save().
  • Encryption permissions are enforced by PDF viewers; the library is not a DRM mechanism.

Aspose.PDF for C++ Enterprise Edition does not have these
limitations and covers a broader feature set.

Documentation and support

License

The library is released under the MIT License.
It compiles in the Liberation fonts, which are licensed under the SIL Open Font License 1.1, so
the SPDX expression for the distribution as a whole is MIT AND OFL-1.1. See
THIRD_PARTY_NOTICES.md.