XFINIUM.PDF library supports Windows 10 UWP.
Your template does not include any fields so I modified it. The code to fill the form looks like this:
private Assembly assembly = typeof(MainPage).GetTypeInfo().Assembly;
private async void btnFillDocumentTemplate_Click(object sender, RoutedEventArgs e)
{
Stream pdfStream = assembly.GetManifestResourceStream("UWP_FillDocumentTemplate.ModelReleaseTemplate.pdf");
PdfFixedDocument document = new PdfFixedDocument(pdfStream);
pdfStream.Dispose();
// Fill photographer info
document.Form.Fields["PhotographerName"].Value = "John Doe";
document.Form.Fields["PhotographerDateSigned"].Value = "09/03/2017";
document.Form.Fields["PhotographerShootDate"].Value = "08/03/2017";
document.Form.Fields["PhotographerShootCountry"].Value = "Italy";
document.Form.Fields["PhotographerShootDescription"].Value = "Tuscany";
// Draw photographer signature
DrawImageAtFieldLocation(document.Form.Fields["PhotographerSignature"].Widgets[0], "PhotographerSignature.png");
// Fill model info
document.Form.Fields["ModelName"].Value = "Jane Doe";
document.Form.Fields["ModelDOB"].Value = "01/01/1980";
document.Form.Fields["ModelGender"].Value = "Male";
document.Form.Fields["ModelAddress1"].Value = "via Romana no 1";
document.Form.Fields["ModelCity"].Value = "Rome";
document.Form.Fields["ModelState"].Value = "Rome";
document.Form.Fields["ModelCountry"].Value = "Italy";
document.Form.Fields["ModelZip"].Value = "12345";
document.Form.Fields["ModelPhone"].Value = "0123456789";
document.Form.Fields["ModelEmail"].Value = "[email protected]";
document.Form.Fields["ModelDateSigned"].Value = "09/03/2017";
document.Form.Fields["ModelParentName"].Value = "Parent Jane Doe";
// Draw model signature
DrawImageAtFieldLocation(document.Form.Fields["ModelSignature"].Widgets[0], "ModelSignature.png");
// Draw model visual
DrawImageAtFieldLocation(document.Form.Fields["ModelVisualReference"].Widgets[0], "XFINIUM.PDF.png");
// Fill ethnicity
(document.Form.Fields["EthnicityAsian"] as PdfCheckBoxField).Checked = true;
// Fill witness info
document.Form.Fields["WitnessName"].Value = "Witness John Doe";
document.Form.Fields["WitnessDateSigned"].Value = "09/03/2017";
// Draw photographer signature
DrawImageAtFieldLocation(document.Form.Fields["WitnessSignature"].Widgets[0], "WitnessSignature.png");
// If you want to prevent changes to filled data, you can flatten the form fields.
document.Form.FlattenFields();
// Save the filled form
FileSavePicker fileSavePicker = new FileSavePicker();
fileSavePicker.FileTypeChoices.Add("PDF files", new List<string>() { ".pdf" });
fileSavePicker.SuggestedFileName = "ModelReleaseFilled";
var outputFile = await fileSavePicker.PickSaveFileAsync();
if (outputFile != null)
{
var destPdfStream = await outputFile.OpenAsync(FileAccessMode.ReadWrite);
using (Stream stm = destPdfStream.AsStream())
{
document.Save(stm);
await stm.FlushAsync();
}
destPdfStream.Dispose();
}
}
private void DrawImageAtFieldLocation(PdfFieldWidget fieldWidget, string imageName)
{
Stream imageStream = assembly.GetManifestResourceStream("UWP_FillDocumentTemplate." + imageName);
PdfPngImage image = new PdfPngImage(imageStream);
PdfVisualRectangle fieldRect = fieldWidget.VisualRectangle;
// Draw the image on the page where the field widget is located.
fieldWidget.Page.Graphics.DrawImage(image,
fieldRect.Left, fieldRect.Top, fieldRect.Width, fieldRect.Height);
imageStream.Dispose();
}
You can download the filled form and the sample project.
Disclaimer: I work for the company that develops this library.