Ben M Posted August 17, 2024 Posted August 17, 2024 I'm currently tinkering with settings to try to reduce the size of my PDF export. I have the same graphical element (a logo) repeated ~200 times in my project. Do I need to do anything to make sure that it's just being encoded once and referenced 200 times in the output PDF, rather than bloating the file size by encoding multiple copies? Each instance is a linked image, and most of them don't have adjustment layers, if that matters. Quote
walt.farrell Posted August 17, 2024 Posted August 17, 2024 As I understand it (mainly from reading the forums, not personal investigation and examination of internal PDF contents): There are no options for you to set. The Affinity apps will embed your item multiple times, and this will bloat the output file with the multiple copies. I thought there was a forum thread discussing this, but I can't find it right now. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5
Ben M Posted August 17, 2024 Author Posted August 17, 2024 That was what I was worried about. But I just did some tests with a new five-page document and they suggest it's reducing images to a single encoding in a trivial case. One placed image file, other pages blank => exports as 5074 KB PDF Five placed copies of one image file => exports as 5075 KB PDF Five placed copies of one image file, plus transforms/adjustments => exports as 9265 KB PDF Five near-identical image files => exports as 15066 KB PDF That makes me optimistic, but I'm not sure how I would check that this behaviour generalises to my actual project. Presumably by inspecting the output PDF with some tool. walt.farrell 1 Quote
R C-R Posted August 17, 2024 Posted August 17, 2024 4 hours ago, Ben M said: That makes me optimistic, but I'm not sure how I would check that this behaviour generalises to my actual project. Presumably by inspecting the output PDF with some tool. What about just comparing the export file size with a version of your document with vs. without most of the 200 logo copies? You did not say if you are using master pages with the logo on a master page, but if you are it should be fairly easy to remove the logo from all the document pages & then place it directly on a few of the document pages. Quote All 3 1.10.8, & all 3 V2.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
Ben M Posted August 18, 2024 Author Posted August 18, 2024 12 hours ago, R C-R said: What about just comparing the export file size with a version of your document with vs. without most of the 200 logo copies? Good idea. They're not inherited from master pages, but I deleted the copies through the resource manager to see the effect. Exporting at 98% jpeg compression, the PDF size is reduced by 9 MB (<1% change). Exporting at 85% jpeg compression, the PDF size is reduced by 4 MB (<1% change). I also tried re-linking them all at once to a copy of the source image file, and that had no effect. So it's not really clear, but I'd lean towards the small changes suggesting they're being encoded sensibly in the PDF. I was curious so I tested a few other things. At least with new documents, Publisher was very consistent in only marginally increasing exported file sizes with lots of extra duplicated images. It's also pretty agnostic to a lot of things like transforming the graphics, text overlays, etc. Exactly what you'd hope. The biggest effects appeared when I had duplicate images overlapping other graphics (as opposed to e.g. appearing next to them). I am generating PDF/X which flattens transparency, so my guess is that for each such overlap it flattens/rasterises and encodes the resulting graphic in the PDF, replacing what would otherwise be a reference to a graphic it has already encoded. That might explain why in my project, the file size is still reduced a bit by deleting most of the duplicate logos. Pragmatically though, however they're being encoded, the logos aren't contributing much to the large file size compared to other parts of my document, so I'll stop worrying about it. walt.farrell 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.