static void pdfapp_loadpage_xps(pdfapp_t *app) { xps_page *page; fz_device *mdev; fz_error error; error = xps_load_page(&page, app->xps, app->pageno - 1); if (error) pdfapp_error(app, fz_rethrow(error, "cannot load page %d in file '%s'", app->pageno, app->doctitle)); app->page_bbox.x0 = 0; app->page_bbox.y0 = 0; app->page_bbox.x1 = page->width; app->page_bbox.y1 = page->height; app->page_rotate = 0; app->page_links = NULL; /* Create display list */ app->page_list = fz_new_display_list(); mdev = fz_new_list_device(app->page_list); app->xps->dev = mdev; xps_parse_fixed_page(app->xps, fz_identity, page); app->xps->dev = NULL; fz_free_device(mdev); xps_free_page(app->xps, page); }
static void xps_run_page(xps_context *ctx, xps_page *page, fz_device *dev, fz_matrix ctm) { ctx->dev = dev; xps_parse_fixed_page(ctx, ctm, page); ctx->dev = NULL; }
void xps_run_page(xps_document *doc, xps_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie) { fz_matrix page_ctm = *ctm; fz_pre_scale(&page_ctm, 72.0f / 96.0f, 72.0f / 96.0f); doc->cookie = cookie; doc->dev = dev; xps_parse_fixed_page(doc, &page_ctm, page); doc->cookie = NULL; doc->dev = NULL; page->links_resolved = 1; }
void xps_run_page(fz_context *ctx, xps_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie) { xps_document *doc = page->doc; fz_matrix page_ctm = *ctm; fz_pre_scale(&page_ctm, 72.0f / 96.0f, 72.0f / 96.0f); doc->cookie = cookie; doc->dev = dev; xps_parse_fixed_page(ctx, doc, &page_ctm, page); doc->cookie = NULL; doc->dev = NULL; }