Watermark PDF File Online via Watermarking App and via C++ applications
Develop powerful C++ based PDF document Watermarking applications. Freely Watermark various documents including PDF files online via app with instant download.
Watermark PDF Files Online using App
- Upload PDF file to watermark.
- Write the Watermark Text.
- Choose relevant color.
- Click the “Watermark” button.
- Download the Watermarked PDF file.
Watermark PDF Document via C++
- Load the PDF document
- Define WatermarkArtifact and TextState
- Set text state properties
- Use Add method for adding artifact
- Call Save method and get the watermarked PDF document
C++ Code : Watermark PDF Documents
String _dataDir("C:\\Samples\\"); | |
String inputFileName("watermark.pdf"); | |
String outputFileName("watermark_out.pdf"); | |
auto document = MakeObject<Document>(_dataDir + inputFileName); | |
auto artifact = MakeObject<WatermarkArtifact>(); | |
auto textState = MakeObject<TextState>(); | |
textState->set_FontSize(72); | |
textState->set_ForegroundColor(Color::get_Blue()); | |
textState->set_Font(FontRepository::FindFont(u"Courier")); | |
artifact->SetTextAndState(u"WATERMARK", textState); | |
artifact->set_ArtifactHorizontalAlignment (HorizontalAlignment::Center); | |
artifact->set_ArtifactVerticalAlignment (VerticalAlignment::Center); | |
artifact->set_Rotation(45); | |
artifact->set_Opacity(0.5); | |
artifact->set_IsBackground(true); | |
document->get_Pages()->idx_get(1)->get_Artifacts()->Add(artifact); | |
document->Save(_dataDir + outputFileName); |
Develop PDF File Watermarking Application using C++
Need to develop C++ script or utility app to easily Watermark multiple PDF files? With
Aspose.PDF for C++
child API of
Aspose.Total for C++
, any C++ developer can integrate the above API code to program Watermarking app across documents. Powerful C++ library for document watermarking supports many popular formats including PDF format.
C++ Watermark Library for PDF Files
There are options to install Aspose.PDF for C++ onto your system. Please choose one that resembles your needs and follow the step-by-step instructions:
- Install a NuGet Package . See Documentation
- Install the library using Package Manager Console within Visual Studio IDE
System Requirements
You can use this C++ library to develop software on Microsoft Windows, Linux and macOS operating systems:
- 32-bit operating systems.
- Microsoft Windows desktop (7, 8, 10)
- Old versions of OS (XP, Vista and Server 2003)
- Microsoft Visual Studio 2017 or later.
If you develop software for Linux or macOS, please check information on additional library dependencies in
Product Documentation
.
FAQs
- Can I use above C++ code in my application?Yes, you are welcome to download this code. One can easily develop a professional solution to Watermark PDF file using C++. Use Aspose PDF Watermarking API to develop high-level, platform independent software in C++.
- Is this document Watermarking App work only on Windows?You have the flexibility to initiate document Watermarking from any device, irrespective of the operating system it runs on, whether it be Windows, Linux, Mac OS, or Android. All that's required is a contemporary web browser and an active internet connection.
- Is it safe to use the online app to Watermark multiple PDF documents?Of course! The output files generated through our service will be securely and automatically removed from our servers within a 24-hour timeframe. As a result, the download links associated with these files will cease to be functional after this period.
- What browser should to use App?You can use any modern web browser like Google Chrome, Firefox, Opera, or Safari for online PDF document Watermarking.
- How can I Watermark multiple PDF files?Start by uploading one or more files you want to Watermark. You can either drag and drop your PDF files or simply click inside the white area. Afterward, click the 'Watermark' button, and our online Watermarking app will quickly process the uploaded files.
- How long does it take to Watermark the PDF files?This Watermarking application operates quickly, It may take a few seconds to upload the files and Watermark them.