I'd like to have a command-line utility for merging XFDF documents with PDFs. Is one available?
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.
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.