First steps are done. 
Here are first plan files written in Lua which gave good results here.

I really hope that it will ease the developement of a comprehensive and rich 
set of plan files.

-- 
Pierre Marchand
-- Booklet

-- We output an A4 booklet
PageWidth = 595.27559
PageHeight = 841.88976

-- We assume that H > W
-- Argh, we now can do better since we have "if" ;-)
-- Scale = PageHeight / (2*SourceWidth)
if(SourceWidth <= SourceHeight)
then
        Scale = PageHeight / (2*SourceWidth)
        rot = 90
                xof = SourceHeight
                yofA = 0
                yofB = SourceWidth
else
        Scale = PageHeight / (2*SourceHeight)
        rot = 0
                xof = 0;
                yofA = 0
                yofB = SourceHeight
end

do
        rest = PageCount % 4
        totp = PageCount
        if rest ~= 0
                then 
                totp = totp + ( 4 - rest)
                end
        inc = 0
        count = 0
        imax = totp/4
        while count < imax
                do
--              We assume that podofoimpose will discard invalid records
--              such as those with source page greater than PageCount
                
--              Recto
                PushRecord(totp - inc , inc + 1 , rot, xof , yofA)
                PushRecord(inc + 1 , inc + 1 , rot, xof , yofB)
--              Verso
                PushRecord(inc + 2 , inc + 2 , rot, xof , yofB)
                PushRecord(totp-(inc + 1) , inc + 2 , rot, xof, yofA)
                
                count = count + 1
                inc = inc + 2
                end
end
-- Identity - a test script for podofoimpose

-- Required
PageWidth = SourceWidth
PageHeight = SourceHeight

-- Records
i = 1
while i <= PageCount
do
        PushRecord( i , i ,0,0,0)
        i = i + 1
end

                
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to