[poppler] Remove some GlobalParams dependencies from PSOutputDev.

Kristian Høgsberg krh at bitplanet.net
Thu Jul 28 09:16:07 EST 2005


Albert Astals Cid wrote:
> Having a deeped look at your commit i think it will not work.
> 
> You are passing 0, 0, 0, 0 for int imgLLXA, int imgLLYA, int imgURXA, int 
> imgURYA
> 
> that triggers 
> 
> if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) {
>     globalParams->getPSImageableArea(&imgLLX, &imgLLY, &imgURX, &imgURY);
>   }
> 
> that asks for variables that are only modified on 
> GlobalParams::parsePSFileSize, GlobalParams::setPSFileSize, etc.
> 
> I'd suggest removing your changes and make the glib binding call
> 
> void GlobalParams::setPSPaperWidth(int width);
> void GlobalParams::setPSPaperHeight(int height);
> 
> that is what we are doing it in kpdf and that sets the said variables 
> accordingly.

Yeah, good catch - but maybe we should fix this by removing more of our 
xpdfrc dependency: either always fall back to (0, 0) - (width, height) 
or let the user specify the visible area.  Adding more parameters to the 
PSOutputDev constructor scares me a bit though, maybe there's a better 
way to do it.

cheers,
Kristian



More information about the poppler mailing list