Fill Barcode Fields in C++
Contents
[
Hide
]
Use Form for this task. The examples below retain the original C++ code and API Reference steps.
Fill barcode fields
Set product_barcode to 123456789012.
- Create Form.
- Bind the PDF input with Facade::BindPdf().
- Set the barcode field value with Form::FillBarcodeField().
- Save the resulting PDF with Form::
Save().
#include <Aspose.PDF.Cpp/Facades/Form.h>
#include <system/string.h>
namespace Facades::Examples::PDF_Form
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
using Form = Aspose::Pdf::Facades::Form;
void FillBarcodeFields(String inputFile, String outputFile)
{
auto form = MakeObject<Form>();
form->Facade::BindPdf(inputFile);
form->FillBarcodeField(u"product_barcode", u"123456789012");
form->Save(outputFile);
}
} // namespace Facades::Examples::PDF_Form