Skip to content

Commit

Permalink
Use cairo_surface_set_fallback_resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
attah committed Dec 1, 2024
1 parent 2867128 commit 9ce8216
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/libfuncs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ FUNC(cairo, cairo_surface_t*, cairo_image_surface_create, cairo_format_t, int, i
FUNC(cairo, cairo_surface_t*, cairo_pdf_surface_create_for_stream, cairo_write_func_t, void*, double, double);
FUNC(cairo, void, cairo_pdf_surface_restrict_to_version, cairo_surface_t*, cairo_pdf_version_t);
FUNC(cairo, void, cairo_pdf_surface_set_metadata, cairo_surface_t*, cairo_pdf_metadata_t, const char*);
FUNC(cairo, void, cairo_surface_set_fallback_resolution, cairo_surface_t*, double, double);
FUNC(cairo, void, cairo_translate, cairo_t*, double, double);
FUNC(cairo, void, cairo_scale, cairo_t*, double, double);
FUNC(cairo, cairo_status_t, cairo_status, cairo_t*);
Expand Down
2 changes: 2 additions & 0 deletions lib/pdf2printable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ Error pdf_to_printable(std::string inFile, WriteFun writeFun, const PrintParamet
return Error("Unknown format");
}

cairo_surface_set_fallback_resolution(surface, params.hwResW, params.hwResH);

for(size_t pageNo : pageSequence)
{
outPageNo++;
Expand Down

0 comments on commit 9ce8216

Please sign in to comment.