filter: pdftoraster: adapt for const getMediaBox from poppler
poppler made getMediaBox const in commit therefore adapt it
for cups-filters.
@@ -1686,7 +1686,7 @@ static void outPage(PDFDoc *doc, Catalog *catalog, int pageNo,
{
SplashBitmap *bitmap;
Page *page = catalog->getPage(pageNo);
- PDFRectangle *mediaBox = page->getMediaBox();
+ PDFRectangle mediaBox = *page->getMediaBox();
int rotate = page->getRotate();
double paperdimensions[2], /* Physical size of the paper */
margins[4]; /* Physical margins of print */
@@ -1696,14 +1696,14 @@ static void outPage(PDFDoc *doc, Catalog *catalog, int pageNo,
bool landscape = 0;
fprintf(stderr, "DEBUG: mediaBox = [ %f %f %f %f ]; rotate = %d\n",
- mediaBox->x1, mediaBox->y1, mediaBox->x2, mediaBox->y2, rotate);
- l = mediaBox->x2 - mediaBox->x1;
+ mediaBox.x1, mediaBox.y1, mediaBox.x2, mediaBox.y2, rotate);
+ l = mediaBox.x2 - mediaBox.x1;
if (l < 0) l = -l;
if (rotate == 90 || rotate == 270)
header.PageSize[1] = (unsigned)l;
else
header.PageSize[0] = (unsigned)l;
- l = mediaBox->y2 - mediaBox->y1;
+ l = mediaBox.y2 - mediaBox.y1;
if (l < 0) l = -l;
if (rotate == 90 || rotate == 270)
header.PageSize[0] = (unsigned)l;
