I managed to get dompdf library working and the Printer Friendly Version displays correctly. However, the PDF Version displays rotated text in the wrong position.
The style I use in print.css for rotating text is

.deg45{
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
   float: left;
   margin-right: 7px;
}
CommentFileSizeAuthor
#1 pdf-3.png87.79 KBYuri
#1 pdf2.png20.87 KBYuri
#1 pdf1.png25.52 KBYuri
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Yuri’s picture

FileSize
25.52 KB
20.87 KB
87.79 KB

I managed to get dompdf working to some degree, by copying the theme styles to the print.css file in the print module. I know this is not the best way to do it, but using a print.css file in my theme directory, did not work.

However, there are differences between the 'printer friendly version' and the 'PDF version' generated.
My concern is specifically about the rotated text, which rotation works for both printer version and PDF versions, but the PDF version has not positioned the text in the right place.

THE PRINTER FRIENDLY VERSION (displaying correctly)
printer friendly version

THE PDF VERSION (not displaying correctly: wrong position of rotated text)
pdf version

THE HTML USED BY THE PRINTER FRIENDLY VERSION
html

I thought it might have to do with the float: I edited the dompdf_config.inc.php file:
def("DOMPDF_ENABLE_CSS_FLOAT", true);
However, that did make no difference in the output.

Why is the PDF rendered differently from the printer friendly version? Is this by design in the Print module or the dompdf library, or can this be tweaked in order to work correctly?

Yuri’s picture

Title: Make PDF version using CSS used by Tinymce editor » PDF Version displaying differently from Printer Friendly Version
Yuri’s picture

Issue summary: View changes
jcnventura’s picture

Status: Active » Closed (outdated)

Definitively an issue with dompdf.