printing issues with portrait/landscape

Weird printing issue.

printing: A4, paper in portrait, two photo areas 13x18. Both pictures are taken in landscape.
Prints fine on a canon 5700 from dt5.2.1 M1 MacOS sonoma

printing: A4, paper in landscape, photo area 13x18. Picture taken in portrait. Printing from Intel MacOS sonoma and dt5.2.1

The whole idea is to print two 13x18 pictures on one A4 regardless of the photo orientation.

(in LR you can rotate the images in the image areas, even auto fit. In DT you have to rotate the image in the lighttable to make them rotate in the printing area.)

I don’t think that it is due to the different builds (intel vs M1) and I haven’t tried it on linux with 5.3 builds yet.

Example of what happens:
I made a layout in landscape (A4, 21h x 29.5w). with two image areas of 13w x18h cm. The left area filled with one portrait picture. Looks good on screen.

but, the image area is rotated to portrait again instead of printed as the preview.

You are not using TurboPrint, right?

It seems that the autorotate of the page is not done by CUPS.

If you have a PDF printer (not sure if available on macOS) can you check it is works or not?

1 Like

Maybe of interest:

An interesting reply is from tillkamppeter in issues/456:

Quoting here:

First, if a user application, like Darktable prints a file, it should not use the “landscape” option. If the page is actually landscape (width > height) the pdftopdf filter automatically rotates the page by 90 degrees in case the printer pulls in the paper short-edge-first (portrait orientation, size in PPD has width < height) and does not rotate the page if the printer pulls in the paper long-edge-first (landscape orientation, size in PPD has width > height).

And in darktable we have arranged for that:

commit 07d86ce044805dbd6bf9df565fa6641d4fb95ab0
Author: Dan Torop <dtorop@giraff>
Date:   Wed Mar 30 00:28:03 2022 -0400

    print: rely on cups-filter to autorotate images
    
    The cups-filter pdftopdf will autorotate the image to fit the paper
    size. Hence don't specify whether the image is landscape or portrait.
    
    Somewhere between cups-filter v1.28.7 and v1.28.12, there was a change
    such that specifying the landscape option resulted in an offset image,
    rather than being ignored. Not setting this option fixes this.
    
    Fixes #11416.

 src/common/cups_print.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

So it looks like you’re hitting a bug in cups?

1 Like

Thanks, didn’t know that. Is MacOS using cups under the hood?

CUPS is preinstalled on MacOS.

Yes, CUPS is used on macOS… I’m not sure but I also think that Apple is at the origin of the project as still maintain it somehow.

Perhaps not quite that simple: it looks like there are two versions: Apple CUPS and CUPS for the other UNIX/Linux/*BSD systems.