Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created March 27, 2024 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/bd710fc4c8f0677fd9cf1e935248ddf0 to your computer and use it in GitHub Desktop.
Save bjoerntx/bd710fc4c8f0677fd9cf1e935248ddf0 to your computer and use it in GitHub Desktop.
[HttpPost]
[Route("SaveDocument")]
public bool SaveDocument([FromBody] DocumentData documentData)
{
using (var tx = new ServerTextControl())
{
tx.Create();
tx.Load(Convert.FromBase64String(documentData.Document), BinaryStreamType.InternalUnicodeFormat);
FlattenFormFields(tx);
tx.Save("App_Data/results.pdf", StreamType.AdobePDF);
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment