PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 2:39 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Update pdf befor print
PostPosted: Thu Oct 12, 2017 2:44 pm 
Offline

Joined: Thu Oct 12, 2017 2:35 pm
Posts: 1
I've created a pdf with a textfield containg information.
I need to updated this textfield with the current date and time just before print document.

I'm able to add javascript to update info when document is opend in this way

PdfDictionary additionalDictionary = new PdfDictionary(this.pdfDocument);

additionalDictionary.Elements["/S"] = new PdfName("/JavaScript");
additionalDictionary.Elements["/JS"] = new PdfString(PrintUpdateScript);

this.pdfDocument.Internals.AddObject(additionalDictionary);
this.pdfDocument.Internals.Catalog.Elements["/OpenAction"] = PdfSharp.Pdf.Advanced.PdfInternals.GetReference(additionalDictionary);


How can I do the same before print document?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 131 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group