Can I use https://github.com/gmanny/Pechkin this to generate pdf files in console application?
it works fine on wincows form application , although.
Any code sample for console app will help.
and can any 1 explain BeginInvoke , used in this sample
private void OnScPhase(SimplePechkin converter, int phasenumber, string phasedescription)
{
if (InvokeRequired)
{
BeginInvoke((Action)(() => { Text = ("New Phase " + phasenumber + ": " + phasedescription); }));
}
else
{
Text = ("New Phase " + phasenumber + ": " + phasedescription);
}
}
Yes you can,
The code you sent, checks if it executes in UI thread, and transfer it to UI if not, UI elements can't be access outside of the UI thread
in console, you don't need this code, just do Console.WriteLine
instead of this
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.