[poppler]  [PATCH] pdftocairo rotation different than pdftops

Pierre-Luc Samuel Pierre-Luc.Samuel at ticketmaster.com
Wed Jul 13 21:14:56 UTC 2016


Okay....  I had not tried gv, but on my PC, gv contradicts evince (gv 
gives the behavior you describe, but not evince).  I guess I was trying 
to fix an evince bug with my patch, doh!

I tried comparing with a third tool, okular, and it matches gv...

It seems to be the fact that pdftocairo rotates the document and uses 
"PageOrientation: Landscape", as opposed to pdftops which always keeps 
things in Portrait, that confuses my version of evince...

I have not been able to confirm the results when printing, because my 
printer always seems to rotate the document to it's longest side, even 
when I direct print the postscript... I'll have to try a different printer.

Sorry for the patch, it was only fixing the display of evince.

Pierre-Luc

On 07/13/2016 07:42 AM, Adrian Johnson wrote:
> I don't understand what the problem is or how this patch helps. I
> applied the patch and ran:
>
>   pdftocairo -ps rotated0.pdf out.ps
>
> Viewing out.ps with gv the page is upside down. Viewing with evince seg
> faults with "attempt to allocate widget with width -36 and height 15".
>
> Using pdftops or pdftocairo without the patch both gv and evince display
> the page correctly.
>
> On 13/07/16 05:59, Pierre-Luc Samuel wrote:
>> Hi all,
>>
>> I have attached a patch that fixes the rotation in the pdftocairo case.
>> I found out that the bug was only present for PDF that where page size
>> width is greater than height. (seem related to
>> https://bugs.launchpad.net/inkscape/+bug/437550 )
>>
>> This unifies behavior with pdftops.  Please consider merging!  All unit
>> tests still pass.
>>
>> Thanks,
>> Pierre-Luc
>>
>> On 07/12/2016 12:27 PM, Pierre-Luc Samuel wrote:
>>> Hi all,
>>>
>>> I've been experimenting with using pdftocairo as a replacement to
>>> pdftops, but I am encountering a bug with document rotation.
>>>
>>> "pdftops" respects rotations
>>> "pdftocairo -ps" has correct 90 and 270 degrees, but 0 and 180 degrees
>>> are inverted.  Files attached.
>>>
>>> I have some time to investigate this, but do you guys think it would
>>> be a poppler bug or a libcairo bug?
>>>
>>> Thanks,
>>> Pierre-Luc
>>>
>>>
>>> _______________________________________________
>>> poppler mailing list
>>> poppler at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/poppler
>>
>>
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/poppler
>>



More information about the poppler mailing list