Bug 36595

Summary: cairo_set_pdf_surface() is ignored at page 1
Product: cairo Reporter: Volker <volkerobhof>
Component: pdf backendAssignee: Adrian Johnson <ajohnson>
Status: RESOLVED DUPLICATE QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: critical    
Priority: medium    
Version: 1.10.1   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: test file

Description Volker 2011-04-25 15:48:31 UTC
Created attachment 46069 [details]
test file

I created a sample code for demonstrating the problem.

At page two lines are drawn correctly but not on page 1. After setting cairo_pdf_surface_set_size() I expected that the surface is reset to the new size but it isn't. Lines are shown at page two for the first time and so I think it is a bug. 


sample code:


cairo_surface_t *su = cairo_pdf_surface_create("test.pdf", 1, 1);
cairo_t *cr;

cr = cairo_create(su);


cairo_pdf_surface_set_size(su, 580, 900);

cairo_move_to (cr, 128.0, 25.6);
cairo_line_to (cr, 230.4, 230.4);
cairo_rel_line_to (cr, -102.4, 0.0);
cairo_curve_to (cr, 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);

cairo_stroke (cr);


cairo_show_page(cr);


cairo_pdf_surface_set_size(su, 580, 900);

cairo_move_to (cr, 128.0, 25.6);
cairo_line_to (cr, 230.4, 230.4);
cairo_rel_line_to (cr, -102.4, 0.0);
cairo_curve_to (cr, 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);

cairo_stroke (cr);


cairo_show_page(cr);


cairo_surface_destroy(su);
cairo_destroy(cr);
Comment 1 Andrea Canciani 2011-06-20 07:07:31 UTC

*** This bug has been marked as a duplicate of bug 24691 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.