Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ABCpdf PDF Component
#2
Macro ABCpdf .NET
Code:
Copy      Help
;create variable that manages compiled C# code
CsScript x
x.SetOptions("references=ABCpdf")

;compile code after #ret
x.AddCode("")

;call static function
int R=x.Call("Class1.TestFunction" _s.expandpath("$desktop$\QM ABCpdf.pdf"))
out R


#ret
//C# code
using System;
using WebSupergoo.ABCpdf9;

public class Class1
{
static public int TestFunction(string saveToThisFile)
{
Doc theDoc = new Doc();
theDoc.FontSize = 96;
theDoc.AddText("Quick Macros");
theDoc.Save(saveToThisFile);
theDoc.Clear();

return 1;
}

//add more functions here if need
}


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)