Skip to content

Instantly share code, notes, and snippets.

@hurricanepkt
Last active December 19, 2015 21:39
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 hurricanepkt/6021781 to your computer and use it in GitHub Desktop.
Save hurricanepkt/6021781 to your computer and use it in GitHub Desktop.
Contact
XSettings.InstallLicense("<<working license>>");
Doc theDoc = new Doc();
theDoc.Rect.Inset(72, 144);
theDoc.Page = theDoc.AddPage();
theDoc.HtmlOptions.Engine = EngineType.Gecko;
int theID = theDoc.AddImageUrl("http://www.microsoft.com/");
while (true)
{
theDoc.FrameRect(); // add a black border
if (!theDoc.Chainable(theID))
break;
theDoc.Page = theDoc.AddPage();
theID = theDoc.AddImageToChain(theID);
}
for (int i = 1; i <= theDoc.PageCount; i++)
{
theDoc.PageNumber = i;
theDoc.Flatten();
}
theDoc.Save(Response.OutputStream);
theDoc.Clear();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment