Is there a command-line utility for merging XFDF documents with PDFs?

Q:

I’d like to have a command-line utility for merging XFDF documents with PDFs. Is one available?

A:

We don’t provide a prebuilt command-line tool for merging XFDFs into PDFs, largely because the PDFNet SDK makes it so easy to write.

For example, if you download one of the .Net SDKs from https://www.pdftron.com/pdfnet/downloads.html, then replace the text of FDFTest.cs with the following:

using System;
using pdftron;
using pdftron.Common;
using pdftron.Filters;
using pdftron.SDF;
using pdftron.PDF;
using pdftron.FDF;

namespace FDFTestCS
{
class Class1
{
private static pdftron.PDFNetLoader pdfNetLoader = pdftron.PDFNetLoader.Instance();
static void Main(string[] args)
{
PDFNet.Initialize();

try
{
using (PDFDoc in_doc = new PDFDoc(args[0]))
{
in_doc.InitSecurityHandler();
using (FDFDoc fdoc = new FDFDoc(FDFDoc.CreateFromXFDF(args[1])))
{
in_doc.FDFMerge(fdoc);
in_doc.Save(args[2], SDFDoc.SaveOptions.e_linearized);
}
}
}
catch (PDFNetException e)
{
Console.WriteLine(e.Message);
}
}
}
}

It will produce a command-line utility for doing what you’re looking for. Using the output executable, you can run

FDFTest.exe input.pdf input.xfdf output.pdf

and see the merged values in output.pdf.