NOPackage lPackage=NOPackage.createPackage(1,"out.xps");
{
NOPage lPage=lPackage.getDocument(0).createPage();
NOXFixedPage lContent=lPage.getFixedPage();
lContent.intialize(8.3*96,11.7*96); // A4: 210x297mm or 8.3x11.7inch
NOXCanvas lCanvas=lContent.createCanvas(0);
lCanvas.intialize();
NOXGlyphs lGlyphs=lCanvas.createGlyphs(0);
NOFont lFont=lPage.addFont("../testfiles/Arial.ttf");
NOString lURI = new NOString("/" + lFont.getPartName());
lGlyphs.intialize(20, lURI.getHandler(), 300, 50);
lGlyphs.setFill(new NOString("#FF000000").getHandler());
lGlyphs.setUnicodeString(new NOString("Take me to http://nixps.com").getHandler());
lGlyphs.setName(new NOString("page_1").getHandler());
lGlyphs.setFixedPageNavigateUri(new NOString("http://www.nixps.com").getHandler());
}
// write out and close
lPackage.writePackageToFile("out.xps");
NOPackage.destroyPackage(ref lPackage);
Subscribe to
Posts [Atom]