Jump to content
You must now use your email address to sign in [click for more info] ×

Impossibility to export PDF at an exact and predetermined pixel size


Recommended Posts

Hello,

I'm trying to make full HD PDF slides, standard 1920 × 1080 px.

I create a new document, web (or A4, same thing), 300dpi, RGB, 1920×1080, so far so good.

image.png.09c20e4e9f4b0dfa07bd5a111283e26f.png

Then I do an PNG or JPG export, all good, the dimensions of the exported images are correct.

Then I try a PDF export, with same resolution, 300dpi, same as the document :

image(1).png.6a98bd85c15228f10f36e049589eb72a.png

And when I open this pdf, it's really small, 460×260 approx. (wich seems to be (1920|1080)/300×72, orienting me on a dpi problem)

image(2).thumb.png.57d5810a1ee33a8d8588e5751eea5171.png

So I tried to change the resolution of the document and export to 72dpi but then the pdf is huge (~2933×1633) and I can't find why.

The issue are :

  1. If I define a document size in pixel, I want that the output have the same number in pixels, despite the dpi seting. Dpi are for the physical world, and must not be taken in account when setting a document size in pixels
  2. How can I export a pdf from Publisher with a precise and predictible size in pixels?

How to reproduce :

  1. Create a document, any size, any dpi (e.g. 300)
  2. Export it in PDF, open it and set the zoom tu true size in acrobat and see that it's not the same size as your Publisher document.

Other test : When I export a 100×100 @100dpi document and export it, the pdf export is ~110px, and when I open it in Publisher, the document size is 72pts (wich does not convert to 110px).

Please help, I just want to export my slides 😭🤯

Find the tests documents attached.

(Designer V2.4.0, Windows 11)

Sans titre.pdf Sans titre.afpub

Link to comment
Share on other sites

2 hours ago, Julien_dedale said:

And when I open this pdf, it's really small, 460×260 approx. (wich seems to be (1920|1080)/300×72, orienting me on a dpi problem)

Hi @Julien_dedale and welcome to the forums,

PDF files use Points as their standard unit of measurement with 72 points to the inch, so the measurement you see 460.8 x 259.2 is points rather than pixels...

To achieve a PDF which is 1,920 px x 1,080 px at 300 dpi you would need to create a Publisher document at 8,000 px x 4,500 px. If you export this to a PDF you should see it displayed as 1,920 pt x 1,080 pt in Acrobat Reader (assuming you have units set to points)...

If you then open the PDF in Publisher it will open as 1,920 pt x 1,080 pt at 300 dpi. If you change the Document resolution to 72 dpi and then change the units to Pixels you will see your file is now 1,920 px x 1,080 px.

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Thank you for the reply but i'm still a little bit puzzled :

How can I have Publisher document, at 1920×1080px, showed at this true size in zoom 100% in publisher, that export to a pdf which is exactly 1920×1080px when opened at 100% in acrobat?

 

Thank you for your help!

Link to comment
Share on other sites

On 3/2/2024 at 10:16 AM, Julien_dedale said:

300dpi, RGB, 1920×1080

A 300 DPI document that is 1920x1080 px is only 6.4 x 3.6 inches in size.

46 minutes ago, Julien_dedale said:

which is exactly 1920×1080px

That is not a size; that is simply the number of pixels. You cannot know a size unless you know the pixel density that it will be displayed at.

I'm unsure what it is that you are trying to accomplish, but if you're wanting to use PDF, I would suggest starting by designing your document at 72 DPI, which is the equivalent of 72 points per inch.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Just to add to what @walt.farrell mentions above, a PDF file per se doesn't have a resolution but any images contained within it will...

Because PDF uses points as its default unit of measurement and for all intent and purpose there are 72 pts per inch then 1,920 px x 1,080 px is the same as 1,920 pt x 1,080 pt at 72 dpi so to avoid confusion, working at 72 dpi is a sensible approach.

PDF files exported from PowerPoint are actually only 960 pt x 540 pt vs a PDF exported from Keynote (on Mac) which is 1,092 pt x 1,080 pt.

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

16 minutes ago, walt.farrell said:

That is not a size; that is simply the number of pixels. You cannot know a size unless you know the pixel density that it will be displayed at.

I'd like to disagree in this case: as you noticed yourself, the pixel density was given by the document resolution of 300 dpi. The confusing part appaers rather to be the condition:

1 hour ago, Julien_dedale said:

a pdf which is exactly 1920×1080px when opened at 100% in acrobat

… because a PDF viewing app (e.g. Acrobat) may have its own app preference for displayed resolution / pixel vs physical size.

However, you can create the wanted document with the according settings in APub's "New…" dialog, set to Pixels as unit, like so (for V1):

1920x1080apub.jpg.017b766d137700c09b652bcaca75e43c.jpg

But note, PDF generally has the unit Point (pt), not Pixel (px) and thus a unit conversion gets involved, resulting in decimals for one or the other unit.

1920x1080 afpub.pdf

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

41 minutes ago, thomaso said:

However, you can create the wanted document with the according settings in APub's "New…" dialog, set to Pixels as unit, like so (for V1):

  • Create a Publisher document that is 1,920 px x 1,080 px @ 300 dpi
  • Export to PDF and reopen in Publisher
  • Change the default unit from points to pixels
  • Your file will be 460.8 px x 259.2 px

The original question was "How can I export a pdf from Publisher with a precise and predictable size in pixels?"

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

11 minutes ago, Hangman said:

Your file will be 460.8 px x 259.2 px

Strange. To me in V1 my exported PDF (attached above) gets opened & placed in APub with its initial size of 1920 x 1080 px.

My previous post referred just to the OP's update: "How can I have Publisher document, at 1920×1080px, showed at this true size in zoom 100% in publisher, that export to a pdf which is exactly 1920×1080px when opened at 100% in acrobat?", – without having read the entire thread, Sorry!

Now I tried the PDF of the OP's initial post, and indeed this opens / gets placed in APub with the smaller size. The Resource Manager reports for the OP's pdf a "Original DPI" of 72 dpi whereas mine is listed as 300 dpi (and 1920 x 1080 px). And, oddly, both pdf get displayed with the same size on screen in Acrobat and Apple Preview in 100% (while Preview is set to show 100% as pixel size, not physical print size).

This makes me wonder how my V1 pdf is displayed if opened or placed in V2 ?

resourcemanager1.thumb.jpg.fdb62205a10cb9fecfd2fb3c5044de36.jpg

resourcemanager2.thumb.jpg.20f48e65c6f9bd83031239f64c53443f.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

13 minutes ago, thomaso said:

This makes me wonder how my V1 pdf is displayed if opened or placed in V2 ?

The same as in your first screen capture (1920x1080 @ 300 dpi - 100%).

Affinity Suite 2.4 – Monterey 12.7.4 – MacBookPro 14" 2021 M1 Pro 16Go/1To

I apologise for any approximations in my English. It is not my mother tongue.

Link to comment
Share on other sites

55 minutes ago, Oufti said:

The same as in your first screen capture (1920x1080 @ 300 dpi - 100%).

This might indicate an issue with the export in V2 (and maybe Windows only?) – or with the "Estimate" resolution when opening/importing ?

If I open the OP's pdf with "Estimate" or "72 dpi" it results in 460.8 pt x 259.2 pt -> 460.8 px x 259.2 px.
If I open the OP's pdf with "300 dpi" it has the wanted size of 460.8 pt x 259.2 pt -> 1920 px x 1080 px.

If I open my pdf with "Estimate" or "300 dpi" it results in 1920 px x 1080 px.
If I open my pdf with "72 dpi" it results in 460.8 px x 259.2 px.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

1 hour ago, thomaso said:

Strange. To me in V1 my exported PDF (attached above) gets opened & placed in APub with its initial size of 1920 x 1080 px.

For some reason, you're document is being interpreted as 300 dpi which may be down to a longstanding bug in V1... If Opening your PDF do you have it set to Estimate or 300 dpi?

If Placing your PDF then that is an entirely different matter...

Note how the Original and Place DPI differs between Publisher 1.10.8 and 2.4.0 (namely v1 and v2) when Placing the same PDF files in identically sized documents using the same document dpi...

Publisher v1.10.8

Publisher173.thumb.png.f6506973c68ba09d92a25bd1b34bd176.png

 

Publisher v2.4.0

Publisher240.thumb.png.fa868370c888ea76ea594d2e8a0b26da.png

 

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

29 minutes ago, thomaso said:

If I open the OP's pdf with "Estimate" or "72 dpi" it results in 460.8 pt x 259.2 pt -> 460.8 px x 259.2 px.
If I open the OP's pdf with "300 dpi" it has the wanted size of 460.8 pt x 259.2 pt -> 1920 px x 1080 px.

If I open my pdf with "Estimate" or "300 dpi" it results in 1920 px x 1080 px.
If I open my pdf with "72 dpi" it results in 460.8 px x 259.2 px.

If opening with an Estimate of 300 dpi then of course the file will open at 1,920 px a 1,080 px since you've specified the document resolution but the PDF itself doesn't have a resolution, you've simply defined a Publisher document resolution...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

16 minutes ago, Hangman said:

If opening with an Estimate of 300 dpi then of course the file will open at 1,920 px a 1,080 px since you've specified the document resolution but the PDF itself doesn't have a resolution, you've simply defined a Publisher document resolution...

"Estimate" OR "300", – not "Estimate of …".  Your idea is correct for "300" while the "Estimate" option might do something different.

Interestingly with "Estimate" I get different sizes for the OP's versus my PDF – although both files contain a vector rectangle only.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

11 hours ago, thomaso said:

Interestingly with "Estimate" I get different sizes for the OP's versus my PDF – although both files contain a vector rectangle only.

Basic though it is, could you upload your Publisher file as there is clearly something interesting going on here...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Hello, thank you for your replies and your help.

I know that for a physical size like paper size, the number of pixel, coupled to DPI, ate just an information of density.

But I'm trying to make a digital document, with a certain number of pixels, displayed on screen, and the size is the pixel in this case. If my screen is 1920 pixel wide, I want my pdf to be displayed to this size at 100%, in pixels.

I tried 72dpi as a base, but the output is more than 1920px.

I wonder if it's not a Windows issue as my friends on mac seems to have the correct size outputted if they set the document attached on the first post at 72dpi.

Link to comment
Share on other sites

5 minutes ago, Julien_dedale said:

But I'm trying to make a digital document, with a certain number of pixels, displayed on screen, and the size is the pixel in this case. If my screen is 1920 pixel wide, I want my pdf to be displayed to this size at 100%, in pixels.

Could you elaborate a little in terms of how your PDF will be displayed, is it going to be displayed by the user using a PDF Reader like Acrobat or is it designed to be displayed in a web browser?

5 minutes ago, Julien_dedale said:

But I'm trying to make a digital document, with a certain number of pixels, displayed on screen, and the size is the pixel in this case. If my screen is 1920 pixel wide, I want my pdf to be displayed to this size at 100%, in pixels.

Are you able to provide a couple of typlical sample pages from your digital document so we can get a better understanding of the content as that may play a part here...

5 minutes ago, Julien_dedale said:

I wonder if it's not a Windows issue as my friends on mac seems to have the correct size outputted if they set the document attached on the first post at 72dpi.

Generally Windows uses 96 dpi rather than 72 dpi as it's default though that shouldn't impact PDF files...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Posted (edited)
Quote

Generally Windows uses 96 dpi rather than 72 dpi as it's default though that shouldn't impact PDF files...

Yes I thought of that from the start and tried 96dpi but the output in pixels is still not correct with this dpi setting :(

For the example, I can't give you the real one but the file it in my first post act exactly the same.

My PDF would be presentation slides, displayed in browser or acrobat, ideally at true size.

Edited by Julien_dedale
Link to comment
Share on other sites

3 minutes ago, Julien_dedale said:

Yes I thought of that from the start and tried 96dpi but the output in pixels is still not correct with this dpi setting :(

Are you able to confirm the question regarding how the PDF will be displayed, i.e., on the desktop or via a web browser?

If using e.g., Acrobat Reader on Desktop, is there any reason for displaying at 'Actual Size' rather than 'Zoom to Page Level', 'Fit Width' or 'Full Screen'?

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Posted (edited)

I sent my reply to fast and completed it before your previous post, sorry.

The reason I want to display it true size in 100% is that I need standardized 1920×1080 slides and an output size that I can control, so i'm sure how it will be displayed on a 1080 TV on fullscreen, without upscaling or downscaling without side effects like blur or aliasing effects. I did that all the time in Indesign withour issue.

Really, the dpi document setting must not be taken in account in PDF export when it's a pixel document exported as screen pdf.

With trial and error, I find that the correct dpi to have the right output on Windows seems to be (nearly) 110dpi, don't know why as 100% zoom in win 11 is 96dpi.

Edited by Julien_dedale
Link to comment
Share on other sites

You won't achieve this using PDF files because PDF files are not a pixel-based file format which means that any 'resolution' is determined by the content of the PDF, not the PDF file itself:

  • If exporting a vector file from Publisher that is 1,920 px x 1,080 px at 300 dpi to a pdf file then it will be 460.8 pt x 259.2 pt @ 72 dpi or 460.8 px x 259.2 px @ 72 dpi when reopened in Publisher but will appear at 460.8 pt x 259.2 pt in Acrobat Reader
     
  • If exporting a 300 dpi raster file from Publisher that is 1,920 px x 1,080 px at 300 dpi to a pdf file then it will be 460.8 pt x 259.2 pt @ 300 dpi or 1,920 px x 1,080 px at 300 dpi when reopened in Publisher but will appear at 460.8 pt x 259.2 pt in Acrobat Reader

So the easiest solution as @thomaso mentioned earlier in the thread would be to simply change the Page Display in the Acrobat Preferences from its default setting to a custom setting that best matches the TV display...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

@lacerto I inisist that I don't talk about physical size, a pixel on a screen is a pixel, zoomed or not (the size its render is another question. If I have an image of 100px, I want it to measure 100px, whichever the number of millimeters it's displayed at the end. It works well with jpg and pdf export.

@Hangman Thank you for the videos, but there is no reason that the size in pixel is not enforced. At the end, acrobat displays a certain size at 100%, there has to be a mean to decide in my design software what this size will be. Il Indesign, if you set your document to a certain size, it will be outputed this size. Same in Publisher with JPG and PNG.

When I export to png with publisher, whatever the resolution in dpi is, the output file size in pixel is the same as the document setting. I simply want the same thing for pdf export, like it works on indesign, photoshop and illustrator (and Publisher for other file formats). You can see the pixel size in the pdf file property (on mac not PC)

I think that there is a calculation at play with pdf export that should not be there.

Thank you for the second video with the acrobat settings, I will use ths system default DPI (mine was set on custom 110 dpi, don't know why) but this mean that on a Mac for example, it will not be displayed at the same number of pixels as the default resolution is 147.

Thank you for yourr time, I will look this forward and continue my testing of Publisher with my deck of slides 👍

Link to comment
Share on other sites

2 hours ago, Julien_dedale said:

I find that the correct dpi to have the right output on Windows seems to be (nearly) 110dpi, don't know why as 100% zoom in win 11 is 96dpi.

Same to me for Acrobat in macOS (while Apple's Preview app does not offer/require this setting but has an option for 'pixel' versus 'print' size). To me it also may matter that the main screen (laptop) is a 'Retina' screen (with increased pixel density).

Bildschirmfoto2024-03-04um12_52_35.jpg.5ed148daab08e9c01571e7edd45672ec.jpg

4 hours ago, Hangman said:
15 hours ago, thomaso said:

Interestingly with "Estimate" I get different sizes for the OP's versus my PDF – although both files contain a vector rectangle only.

Basic though it is, could you upload your Publisher file as there is clearly something interesting going on here...

Here it is (+ the exported PDF):  1920x1080 V1.afpub  -  1920x1080 afpub V1.pdf

1920x1080afpubV1.thumb.jpg.12056124c430216d07322a82f1f4837a.jpg

1 hour ago, Hangman said:

So the easiest solution (…) would be to simply change the Page Display in the Acrobat Preferences from its default setting to a custom setting that best matches the TV display...

As workaround in @Julien_dedale's (or your) setup it might also work to add a tiny layer of type "Pixel" in the layout to force a specific resolution saved with an exported PDF.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

19 minutes ago, Julien_dedale said:

 I inisist that I don't talk about physical size, a pixel on a screen is a pixel, zoomed or not (the size its render is another question. If I have an image of 100px, I want it to measure 100px, whichever the number of millimeters it's displayed at the end. It works well with jpg and pdf expor

In that case I do not understand what same or exact size (on different devices) means (assuming that your image really has the same amount of pixels). 1 px measures different width and height depending on the device, e.g., as shown on my post, I can have my laptop screen filled with pixels in range of 800 x 600px => 3840 x 2400px (+/- effect of scaling) so the size of the image will vary while having it zoomed at 100% level all the time.

Link to comment
Share on other sites

Hi @Julien_dedale,

23 minutes ago, Julien_dedale said:

When I export to png with publisher, whatever the resolution in dpi is, the output file size in pixel is the same as the document setting.

This makes perfect sense because, png, jpeg and tiff files are all raster-based file formats that use pixels as their unit of measurement, pdf files don't use pixels but points so there is always going to be a conversion between the two...

33 minutes ago, Julien_dedale said:

Il Indesign, if you set your document to a certain size, it will be outputed this size. Same in Publisher with JPG and PNG.

I'd certainly be interested to see a sample .IDML file along with the pdf exported from it so we can see what is going on there that differs to Publisher...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.