C++ kullanarak PDF belgelere bir metin veya resim filigranı ekleyin. PDF belgesini yükleyin ve gerekli filigranı buna ekleyin. Ardından sonucu DOCX, PDF, MD, HTML, TXT, DOC, RTF, EPUB, XPS ve daha fazlası gibi uygun bir biçimde kaydedin ve filigranlı belgeyi başka bir kişiyle paylaşın. Ayrıca, filigran belgeye önceden eklenmişse ve ekleme nedenleri artık geçerli değilse, PDF belgesinden de filigranı kaldırın.
Bu C++ API ile geliştiriciler, PDF çevrimiçi olarak bir filigran ekleyebilir. Metin veya resim kullanarak filigranı oluşturmanız ve ardından bu filigranı C++ PDF belgenize eklemeniz yeterlidir.
Not: Herhangi bir üçüncü taraf uygulama veya kitaplık yüklemenize gerek yoktur. Bu nedenle, C++ yazılım çözümümüzün kullanımı çok kolaydır.
Verilen C++ SDK, PDF filigranları kaldırmak için de yararlıdır. PDF bir filigranı kaldırmak, bir metin veya görüntü filigranı ile damgalanmış istediğiniz PDF belgesini yükleyebileceğiniz, C++ kullanarak bu filigranı PDF kaldırabileceğiniz ve ardından çıktı dosyasını uygun bir biçimde kaydedebileceğiniz anlamına gelir – DOC, DOCX, PDF, JPEG, PNG, TIFF ve diğerleri.
C++ API'mızla PDF bir filigranın nasıl ekleneceğini veya kaldırılacağını değerlendirmek için, PDF ve filigranı bir resim veya metin olarak yükleyin. Ardından uygun bir dışa aktarma dosyası formatı seçin – DOC, DOCX, PDF, HTML, RTF, XPS ve diğerleri.
Nasıl çalıştığını görmek için aşağıdaki örneği kullanın:
using namespace aspose::words::cloud;
auto config = std::make_shared<ApiConfiguration>(
L"####-####-####-####-####", L"##################");
auto wordsApi = std::make_shared<WordsApi>(config);
auto requestDocument = std::shared_ptr<std::istream>(
new std::ifstream(std::filesystem::path(L"Input1.pdf"), std::istream::binary));
auto requestImageFile = std::shared_ptr<std::istream>(
new std::ifstream(std::filesystem::path(L"Input2.pdf"), std::istream::binary));
std::shared_ptr<requests::InsertWatermarkImageOnlineRequest> insertWatermarkImageOnline(
new requests::InsertWatermarkImageOnlineRequest(
requestDocument, requestImageFile
)
);
auto insertedWatermarkImage = wordsApi->insertWatermarkImageOnline(insertWatermarkImageOnline);
auto requestDocument = std::shared_ptr<std::istream>(
insertedWatermarkImage->document->values.begin, std::istream::binary));
std::shared_ptr<requests::ConvertDocumentRequest> convertDocument(
new requests::ConvertDocumentRequest(
requestDocument, std::make_shared<std::wstring>(L"pdf")
)
);
wordsApi->convertDocument(convertDocument);
using namespace aspose::words::cloud;
auto config = std::make_shared<ApiConfiguration>(
L"####-####-####-####-####", L"##################");
auto wordsApi = std::make_shared<WordsApi>(config);
auto requestDocument = std::shared_ptr<std::istream>(
new std::ifstream(std::filesystem::path(L"Input.pdf"), std::istream::binary));
auto requestWatermarkText = std::make_shared<aspose::words::cloud::models::WatermarkText>();
requestWatermarkText->setText(std::make_shared<std::wstring>(L"This is the watermark text."));
requestWatermarkText->setRotationAngle(std::make_shared<double>(90));
std::shared_ptr<requests::InsertWatermarkTextOnlineRequest> insertWatermarkTextOnline(
new requests::InsertWatermarkTextOnlineRequest(
requestDocument, requestWatermarkText
)
);
auto insertedWatermarkText = wordsApi->insertWatermarkTextOnline(insertWatermarkTextOnline);
auto requestDocument = std::shared_ptr<std::istream>(
insertedWatermarkText->document->values.begin, std::istream::binary));
std::shared_ptr<requests::ConvertDocumentRequest> convertDocument(
new requests::ConvertDocumentRequest(
requestDocument, std::make_shared<std::wstring>(L"pdf")
)
);
wordsApi->convertDocument(convertDocument);
using namespace aspose::words::cloud;
auto config = std::make_shared<ApiConfiguration>(
L"####-####-####-####-####", L"##################");
auto wordsApi = std::make_shared<WordsApi>(config);
auto requestDocument = std::shared_ptr<std::istream>(
new std::ifstream(std::filesystem::path(L"Input.pdf"), std::istream::binary));
std::shared_ptr<requests::DeleteWatermarkOnlineRequest> deleteWatermarkOnline(
new requests::DeleteWatermarkOnlineRequest(
requestDocument
)
);
auto deletedWatermark = wordsApi->deleteWatermarkOnline(deleteWatermarkOnline);
auto requestDocument = std::shared_ptr<std::istream>(
deletedWatermark->document->values.begin, std::istream::binary));
std::shared_ptr<requests::ConvertDocumentRequest> convertDocument(
new requests::ConvertDocumentRequest(
requestDocument, std::make_shared<std::wstring>(L"pdf")
)
);
wordsApi->convertDocument(convertDocument);
GitHub'dan Aspose.Words Cloud SDK for C++ klonlayın. SDK'yı oluşturma ve yapılandırma hakkında ayrıntılı bilgileri "SDK "How to use the SDK" bölümünde bulabilirsiniz.
Gerekli güvenlik kimlik bilgilerini hızla almak ve REST API'mize erişmek için lütfen belgelerdeki bu Instructions izleyin.
Ayrıntıları görmek için Repository Documentation bakın.
Bir belgeye başka biçimlerde filigran ekleyebilirsiniz: