\advance\x by \extraE
\advance\x by \extraW
\advance\y by \extraN
\advance\y by \extraS
\newbox\xxxx\setbox\xxxx=\hbox to \x{\kern\extraW\raise\extraS\box\xxx\hss}%\dp\xxx=0bp
\wd\xxxx=\x
\ht\xxxx=\y
\immediate\pdfxform\xxxx
\newcount\THmaplegend\THmaplegend=\pdflastxform
\advance\pdfhorigin by \extraW
\advance\pdfvorigin by \extraN
\advance\pdfpagewidth by \extraW
\advance\pdfpagewidth by \extraE
\advance\pdfpageheight by \extraN
\advance\pdfpageheight by \extraS
\newdimen\overlap\overlap=28.35bp
\dimtobp{\the\pdfpagewidth}\edef\xsize{\tmpdef}%
\dimtobp{\the\pdfpageheight}\edef\ysize{\tmpdef}%
\advance\y by -\extraN\advance\y by \overlap
\dimtobp{\the\y}\edef\nsize{\tmpdef}%
\x=\extraW\advance\x by \overlap
\dimtobp{\the\x}\edef\wsize{\tmpdef}%
\newdimen\overlaphalf\overlaphalf=\overlap\divide\overlaphalf by 2%
\newdimen\framew\framew=\pdfpagewidth\advance\framew by -\overlap
\newdimen\frameh\frameh=\pdfpageheight\advance\frameh by -\overlap
\newdimen\framex\framex=\extraW\advance\framex by \overlaphalf
\newdimen\framey\framey=\extraN\advance\framey by \overlaphalf
\dimtobp{\framew}\edef\Framew{\tmpdef}%
\dimtobp{\frameh}\edef\Frameh{\tmpdef}%
\dimtobp{\framex}\edef\Framex{\tmpdef}%
\dimtobp{\framey}\edef\Framey{\tmpdef}%
\adjustedHS=-infbp\advance\adjustedHS by \extraE\advance\adjustedHS by \extraW\advance\adjustedHS by \overlap\advance\adjustedHS by \overlap
\adjustedVS=-infbp\advance\adjustedVS by \extraN\advance\adjustedVS by \extraS\advance\adjustedVS by \overlap\advance\adjustedVS by \overlap
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate0 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate1 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate2 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate3 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate4 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate5 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate6 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate7 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\calibrX{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenX=\tmpdimen
\calibrY{-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000000000bp}\tmpdimenY=\tmpdimen
\pdfcatalog { /thCalibrate8 (X=\the\tmpdimenX, Y=\the\tmpdimenY, L=6.3634230014, F=46.0065160050)}
\pdfcatalog { /thCalibrate (HS=\the\adjustedHS, VS=\the\adjustedVS, HD=0.0000000000)}\tmpdimen=\extraW\advance\tmpdimen by \overlap
\dimtobp{\tmpdimen}\edef\adjustedX{\tmpdef}%
\tmpdimen=\extraS\advance\tmpdimen by \overlap
\dimtobp{\tmpdimen}\edef\adjustedY{\tmpdef}%
\PL{q 1.00 1.00 1.00 rg -\wsize\space-\nsize\space\xsize\space\ysize\space re f Q}%
\ifdim\framethickness>0mm\dimtobp{\framethickness}\edef\Framethickness{\tmpdef}\PL{q 0 0 0 RG 1 J 1 j \Framethickness\space w -\Framex\space\Framey\space\Framew\space-\Frameh\space re s Q}\fi
\leavevmode\setbox\xxx=\hbox to 0bp{%
\PL{/OC /oc\the\oca\space BDC}%
\PL{q 1 g}%
\PL{Q}%
\PL{EMC}%
\PL{q}\PL{q}\PL{1.00 0.03 -0.03 1.00 -nan -inf cm}\PB{0}{0}{\THWgrida}\PL{Q}%
\PL{q}\PL{1.00 0.03 -0.03 1.00 -nan -inf cm}\PB{0}{0}{\THWgrida}\PL{Q}%
\PL{q}\PL{1.00 0.03 -0.03 1.00 -nan -inf cm}\PB{0}{0}{\THWgrida}\PL{Q}%
\PL{q}\PL{1.00 0.03 -0.03 1.00 -nan -inf cm}\PB{0}{0}{\THWgrida}\PL{Q}%
\PL{q}\PL{1.00 0.03 -0.03 1.00 -nan -inf cm}\PB{0}{0}{\THWgrida}\PL{Q}%
\PL{q}\PL{1.00 0.03 -0.03 1.00 -nan -inf cm}\PB{0}{0}{\THWgrida}\PL{Q}%
.... the previous line is repeated until i kill the processus ...
