| 369 | | |
|---|
| 370 | | gdouble pageWidth; |
|---|
| 371 | | gdouble pageHeight; |
|---|
| 372 | | // Check which rotation has the document's page to know what is width |
|---|
| 373 | | // and what is height. |
|---|
| 374 | | gint rotate = getRotation (); |
|---|
| 375 | | if ( 90 == rotate || 270 == rotate ) |
|---|
| 376 | | { |
|---|
| 377 | | poppler_page_get_size (page, &pageHeight, &pageWidth); |
|---|
| 378 | | } |
|---|
| 379 | | else |
|---|
| 380 | | { |
|---|
| 381 | | poppler_page_get_size (page, &pageWidth, &pageHeight); |
|---|
| 382 | | } |
|---|
| 383 | | |
|---|
| 384 | | *width = pageWidth; |
|---|
| 385 | | *height = pageHeight; |
|---|
| 386 | | |
|---|
| 387 | | g_object_unref (G_OBJECT (page)); |
|---|
| | 369 | if ( NULL != page ) |
|---|
| | 370 | { |
|---|
| | 371 | gdouble pageWidth; |
|---|
| | 372 | gdouble pageHeight; |
|---|
| | 373 | // Check which rotation has the document's page to know what is width |
|---|
| | 374 | // and what is height. |
|---|
| | 375 | gint rotate = getRotation (); |
|---|
| | 376 | if ( 90 == rotate || 270 == rotate ) |
|---|
| | 377 | { |
|---|
| | 378 | poppler_page_get_size (page, &pageHeight, &pageWidth); |
|---|
| | 379 | } |
|---|
| | 380 | else |
|---|
| | 381 | { |
|---|
| | 382 | poppler_page_get_size (page, &pageWidth, &pageHeight); |
|---|
| | 383 | } |
|---|
| | 384 | |
|---|
| | 385 | *width = pageWidth; |
|---|
| | 386 | *height = pageHeight; |
|---|
| | 387 | |
|---|
| | 388 | g_object_unref (G_OBJECT (page)); |
|---|
| | 389 | } |
|---|
| | 390 | else |
|---|
| | 391 | { |
|---|
| | 392 | // Just give any valor, except 0. |
|---|
| | 393 | *width = 1.0; |
|---|
| | 394 | *height = 1.0; |
|---|
| | 395 | } |
|---|
| 427 | | poppler_page_render_to_pixbuf (page, 0, 0, width, height, getZoom (), |
|---|
| 428 | | getRotation (), pixbuf); |
|---|
| | 435 | if ( NULL != page ) |
|---|
| | 436 | { |
|---|
| | 437 | poppler_page_render_to_pixbuf (page, 0, 0, width, height, getZoom (), |
|---|
| | 438 | getRotation (), pixbuf); |
|---|
| | 439 | setLinks (renderedPage, page); |
|---|
| | 440 | g_object_unref (G_OBJECT (page)); |
|---|
| | 441 | } |
|---|