summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parsepdf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/parsepdf.c b/test/parsepdf.c
index 054e96d..f569418 100644
--- a/test/parsepdf.c
+++ b/test/parsepdf.c
@@ -55,6 +55,16 @@ read_whole_pdf(const char *fname, uint8_t **buffer, uint64_t *buffer_length)
return NSPDFERROR_OK;
}
+static nspdferror
+pdf_path(const struct nspdf_style *style,
+ const float *path,
+ unsigned int path_length,
+ const float transform[6],
+ const void *ctxin)
+{
+ return NSPDFERROR_OK;
+}
+
static nspdferror render_pages(struct nspdf_doc *doc, unsigned int page_count)
{
nspdferror res;
@@ -62,6 +72,14 @@ static nspdferror render_pages(struct nspdf_doc *doc, unsigned int page_count)
unsigned int page_render_list[4] = { 0, 1, 0, 1};
unsigned int page_index;
+ render_ctx.device_space[0] = 1;
+ render_ctx.device_space[1] = 0;
+ render_ctx.device_space[2] = 0;
+ render_ctx.device_space[3] = -1; /* y scale */
+ render_ctx.device_space[4] = 0; /* x offset */
+ render_ctx.device_space[5] = 800; /* y offset */
+ render_ctx.path = pdf_path;
+
for (page_index = 0; page_index < page_count; page_index++) {
res = nspdf_page_render(doc, page_index, &render_ctx);
if (res != NSPDFERROR_OK) {