priPrinter: Simple sample script - priPrinter

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Simple sample script

#1 User is offline   Alex 

  • Administrator
  • Group: Administrators
  • Posts: 238
  • Joined: 28-February 10
  • LocationHungary

Posted 03 February 2012 - 04:39 PM

This script moves all source pages to predefined position. In this case 5mm and 15 mm.

local NewXPos=5.0;
local NewYPos=15.0;

local npapers=layout.GetNumSheets();
for(local iPaper=0;iPaper<npapers;iPaper++)
{

local paper=layout.GetSheet(iPaper);
local size=paper.GetSize();
local area=paper.GetArea();
local count=paper.GetNumPages();
if(count)
{
// since NewXPos or NewYPos operate in paper space and SetPagePos works in printable area we should subtract area origin
	paper.SetPagePos(0,Point(NewXPos-area.left, NewYPos-area.top));
}
}

-2

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users