PDF export trouble

I am working on a macbook pro with OS 11.1 and Layout 2021.

Part of the title block of the Layout pages I create includes a white circle that is laid on top of a black background. The white circle is a photoshop file that has a transparent background. In previous versions of Layout, when I exported to PDF, this worked fine. In 2021, instead of a white circle on a black background, the graphic becomes a solid white square. This happens when I choose File > Export > PDF. If, however, I create a PDF by doing File > Print > Save as PDF, the white circle on transparent background works just fine.

Why do transparent backgrounds get corrupted in “Export” but work OK in “Print?”

What kind of settings are you using when exporting? Are you using JPEG compression for images? (JPEG doesn’t support image transparency). What image format is the white circle? Is the black background another image or was it created in LayOut? I tried to replicate this on my PC with a PNG image with transparency but my exports went OK both with JPG compression and without.

As a general observation, it is always safer, faster, and resource saving to use “flattened” graphics in any application. Especially PDF files easily get “confused” if they have different types of overlapping graphics, resulting in worst cases to pages and files that won’t open or print. Printing to PDF sort of circumvents these problems as it usually just produces a rasterized screenhot of your page at the required resolution.

Anssi

The output settings of Layout are pretty simple. I have Image Resolution and Image Compression both set to medium. Other than that, there are no settings that I know of.

The graphic used, as I mentioned, was a Photoshop image with a transparent background. If I made it into a JPEG, I would loose the transparent background. I have tried using both .psd and .png versions of the image. Both display their transparent background in Layout properly and both become white blocks when Exported to PDF (and both are correct when I use Print > Save as PDF)

As I mentioned, I have used this graphic for many years in previous Layout version without any trouble. Has something changed in Layout 2021? Or, is this a conflict with OS 11?

Marc

Can you share a LayOut file with the graphic so we can see what we get when we export to PDF.

What I was sort of suggesting between the lines was that you could try exporting to PDF with the JPEG compression turned off, and, if the image is using the PSD format to try converting it into PNG. PNG-s do support transparency. I used PNG in my try and that worked. Might try PSD or TIFF.(Edit: no PSD on a PC)

I don’t know about either as I use a PC. It might be an OS 11 issue. New Mac OS versions have caused graphic glitches like this in the past. I remember people writing about dimension texts coming out as black boxes.

The JPEG setting Anssi mentioned is in the Options, when you are exporting to PDF. Look in there, and make sure that the JPEG option is not checked.

@colin, could you test it on a Mac? For me, the result with a transparent PNG image looked correct on a PC whether image compression was on or off.

I tested. On Mac there is a slight quality difference whether JPEG is on or off. On PC the image looks the same (as if in both cases it was the same as non-JPEG on Mac). Windows does a slight better job of making the file smaller.

But, in all cases the transparency of the image seemed to survive.

Dave;

I am attaching a sample Layout file, and 2 PDFs. As shown in the names of the files, the PDF with the problem was exported and the other one was printed.

I should mention that since I upgraded to Sketchup 2021, SU crashes a lot. Not when working but when closing the software down, I get a bugsplat.

Marc

Layout Test.layout (78.4 KB)

Layout Test EXPORT.pdf (25.2 KB)

Layout Test PRINT.pdf (121 KB)

No problem working with your file here except that the .psd file can’t be displayed on the PC at least without Photoshop installed. Do you get better behavior if you replace the .psd with a .png? Seems to me that using an image file type that is application specific (Photoshop in this case) is likely to cause you problems.

Colin, Anssi

Thanks for the tip about turning off JPEG compression. I tried that and it worked. Both the .psd and the .png graphics maintained their transparency. Two issues:

  1. I never had to turn off JPEG compression in previous versions of SU/Layout. What’s different with 2021?

  2. The file I exported with JPEG compression off was 124Kb. The file “Printed as PDF” was also 124Kb. The file exported with JPEG compression ON was only 26Kb. This seems like a little difference but this file is just the cover page of a document that had many pages with images and SU links. This test Layout file of just the cover page was 80Kb but the original file from which it came was 142.2Mb. You can imagine the difference that would make not using JPEG compression with a file of that size!

Marc

Dave;

If you look at the files I sent again (in particular: Layout Test PRINT.pdf), you will see I did the layout using a .psd file and next to it a .png file of the same image. It says PSD and PNG over each of the graphics to show which is which.

Marc

The png works fine and exports with no problem. I know which one is which from your labels and the fact that the psd doesn’t show as the image. My point is that the .psd can be problematic and it would be smart to avoid adding those to your LO document. Add png or jpg images

Dave;

If I remember, you said you are working on a PC so maybe my problem is mac based.

Thanks for your help.

Marc

I am working on a PC. It may be that your problem is Mac based but try eliminating the psd file and see if you have better luck.

It seems that the PC version of LayOut doesn’t support PSD. The PNG displays and exports perfectly.

The printed PDF @mpk-SU posted displays perfectly in Chrome but the two images look pixelated and ugly in Adobe Acrobat. Might there be a color profile issue?

So, what is the difference between Colin’s Mac and yours? Now I am not sure if he used MacOS 11.1 or older. Did you follow the standard procedure to install SketchUp on your Mac?

All;

Not sure how to fix this ‘export with JPEG compression’ bug but for now my workaround is to put the white circle on a black background instead of transparent. No issue that way. It is the transparency that causes the problem.

Marc

I was testing with my own PNG. If I try mpg-SU’s LayOut file, and put my PNG into it, mine continues to come out with transparency (though with a border of fuzz), and his PNGs come out with a white background. I haven’t figured out what is different about my PNG.

If I try to make a new PNG that is similar, I then get the white background when exporting with JPEG turned on.

One thing I discovered is that the export works fine in 2019, but not in 2020 or 2021. I couldn’t find an existing bug report about it. @trent, could you check if it’s a known issue?