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

Different document dimensions after PDF export


j.schaef

Recommended Posts

What does Affinity Publisher say about the document dimensions? What dimensions did you expect, @j.schaef?

File > Document Setup will give you the DPI and Bleed settings, and File > Spread Setup will give you the page/spread size.

-- 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

Thanks. I suspect the discrepancy is due to conversion from pixel (used internally) to centimeters, and also rounding in all three applications. But I will defer to others with more knowledge to comment further.

-- 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

4 minutes ago, walt.farrell said:

Thanks. I suspect the discrepancy is due to conversion from pixel (used internally) to centimeters, and also rounding in all three applications. But I will defer to others with more knowledge to comment further.

Thanks, otherwise there was no problem so far, but this time the printer refuses to accept my file because of wrong size 😞

Link to comment
Share on other sites

That's strange, when I export a document of the same page dimensions, only the pages' area, with only bleed and crop marks, or full bleed + crop and other print options, for each documents, SumatraPDF, Adobe Reader, Firefox and Foxit Reader give the same value for the page' size.

The document is set in mm. But the size is identical if I set the ruler in pixels.

What are your exports settings?

Link to comment
Share on other sites

  • 2 months later...

Hi guys,

i just encountered a similar problem in the actual windows version 1.10.4.1198.

I set up an ad for printing. The document units is Millimeter and the page size is set to 80 x 69mm. What i forgot was, to set a really high resolution for this document which was intended for printing. So the document resolution was only 72dpi (template default). This resulted in a significant difference of the resulting document size in the exported PDF.

This was obvious because of the black outline. On the right and bottom side there was a little white background shining through.

publisher-bug-pdf-export-size-screen-001-page-settings.png.579b749d82b101d9fa1f8c2d9780ce7c.pngpublisher-bug-pdf-export-size-screen-002-document-settings-72dpi.png.d00b8fe14068cdf200c81ef8ec929080.pngpublisher-bug-pdf-export-size-screen-003-pdfx3-export-publisher.png.8266c04775c6485674cf18600606fe21.pngpublisher-bug-pdf-export-size-screen-004-pdfx3-export-72dpi-acrobat-preflight.png.e19fc9e48b34f95cb8491e1a7c68e9f7.png

With the Acrobat preflight you can see that the resulting page size differs a lot from the original page size. As Walt mentioned this might be the result of internal unit conversion and/or rounding.

What "fixed" the problem for me was, to set the document resolution in publisher to 300dpi. After exporting the document again the discrepancy shrinked to a small amount and the failure is no longer visualy significant.

publisher-bug-pdf-export-size-screen-005-document-settings-300dpi.png.77c438aa871f3662edea9c3361823475.pngpublisher-bug-pdf-export-size-screen-006-pdfx3-export-300dpi-acrobat-preflight.png.035860b1a973c01cc0d6da240ae9578f.png

So, setting the appropriate document resolution for the right media target seems to be crucial.

Nontheless this is not really satisfactory 😐 It would really help to get the right PDF output without hassle. I guess in PDF the values for page, trim, bleed... are only numbers. So why not write them exactly as set in Publisher ?

cheers

 

 

 

Hardware: Windows 11 Pro (23H2, build 22631.3296, Windows Feature Experience Pack 1000.22687.1000.0), Intel(R) Core(TM) i9-14900K @3.20 GHz, 64 GB RAM, NVIDIA RTX A4000 (16GB VRAM, driver 551.61), 1TB + 2TB SSD. 1 Display set to native 2560 x 1440.
Software: Affinity v1 - Designer/Publisher/Photo (1.10.6.1665), Affinity v2 (universal license) - Designer/Publisher/Photo, v2 betas.

Link to comment
Share on other sites

  • 4 months later...
  • Staff

Hi @aledigit,

I can confirm that Walts information provided above is correct - 

On 9/29/2021 at 3:07 PM, walt.farrell said:

I suspect the discrepancy is due to conversion from pixel (used internally) to centimeters, and also rounding in all three applications.

There is a known bug logged with our developers regarding PDF export size being larger than expected, as the Affinity app rounds any 'part' pixel values to whole units when exporting. I'll be sure to bump this log with our team for you now :)

Please Note: I am now out of the office until Tuesday 2nd April on annual leave.

If you require urgent assistance, please create a new thread and a member of our team will be sure to assist asap.

Many thanks :)

Link to comment
Share on other sites

59 minutes ago, Dan C said:

There is a known bug logged with our developers regarding PDF export size being larger than expected, as the Affinity app rounds any 'part' pixel values to whole units when exporting. I'll be sure to bump this log with our team for you now :)

Thank you Dan C! :12_slight_smile:

Link to comment
Share on other sites

  • 2 months later...

This is still a bug in the current version (1.10.5, June 2022, more than a year later)

It's not a DPI problem as others have suggested, I tried various DPI settings.

See screenshot below of Mac OS Preview App: 2.01cm vs. Affinity Designer: 20mm.

Using % pdfcpu boxes list

MediaBox (points) (0.00, 0.00, 56.88, 56.88) w=56.88 h=56.88 ar=1.00

It shows the MediaBox (page size) is 56.88 pt = 20.066 mm

It should be 56.6929 pt (or approx 56.6929133858 pt)

I tried changing my document units into points, and pasting 56.6929, and the UI rounded it to 56.7pt.
I would hope that the internal representation has more than 0.1 pt precision.

image.png.b6efd72b2ad46055529dbe14ad19228b.png

Link to comment
Share on other sites

  • Staff

Hi @Zambetti,

I can confirm this issue is still logged with our developers as a bug, though I will be sure to 'bump' this for you now.

12 minutes ago, Zambetti said:

I tried changing my document units into points, and pasting 56.6929, and the UI rounded it to 56.7pt.
I would hope that the internal representation has more than 0.1 pt precision.

Absolutely, this is simply being rounded for UI purposes - you can set how many decimal places you wish to see in the UI for each unit under Affinity Designer > Preferences > User Interface.

I hope this clears things up :)

Please Note: I am now out of the office until Tuesday 2nd April on annual leave.

If you require urgent assistance, please create a new thread and a member of our team will be sure to assist asap.

Many thanks :)

Link to comment
Share on other sites

Thank you Dan, it is a very helpful tip that the precision of numbers in the UI can be increased.

Also good to know this bug will be addressed in a future version.

For context, I'm using PDFs from Affinity as assets to generate dynamic PDFs on a web server (PHP & FPDF/FPDI).

This 0.1mm document size error has been quite frustrating today since it results in graphics that are slightly and noticeably out of alignment (the width and height of the imported assets are inferred from the PDF document size)

Just in case it helps some others until this is fixed, I've found a work-around for this problem by writing a small script that imports a PDF and produces a PDF with an integer document size (screenshot from Mac OS Preview below).

use setasign\Fpdi\Fpdi;
$pdf = new FPDI();
$pdf->setSourceFile(PATH_TO_YOUR_PDF);
$assetID = $pdf->importPage(1); 
$assetSize = $pdf->getTemplateSize($assetID);
$pdf->AddPage(
    $assetSize['orientation'],
    array(
        round($assetSize['width']),
        round($assetSize['height'])
    )
);
$pdf->useImportedPage($assetID, 0, 0, null, null, false);
header('Content-Type: application/pdf');
header("Content-Transfer-Encoding: binary");
$pdf->Output();

 

image.png.3f9b19eeb55ab4ce55223e383b2f4806.png

Link to comment
Share on other sites

  • 2 months later...

Hey everyone,

any news on that issue? For me this is somehow blocking, since I need to provide correct data for the press. In my case I can reproduce the issue when creating a fresh new document: 400x300mm and 5mm bleed (300dpi) which should result in 410x310mm. What preview shows me is 41,01x31,01cm.

Would really like to know until when we can expect a fix here.

Link to comment
Share on other sites

1 hour ago, orschaef said:

Hey everyone,

any news on that issue? For me this is somehow blocking, since I need to provide correct data for the press. In my case I can reproduce the issue when creating a fresh new document: 400x300mm and 5mm bleed (300dpi) which should result in 410x310mm. What preview shows me is 41,01x31,01cm.

Would really like to know until when we can expect a fix here.

We can expect a fix as soon as PDFs' dimensions are no longer set as integer Points, to the best of my knowledge this is carved in stone. In other words probably never.

879 points = 31.01 cm

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

15 hours ago, Old Bruce said:

We can expect a fix as soon as PDFs' dimensions are no longer set as integer Points, to the best of my knowledge this is carved in stone. In other words probably never.

879 points = 31.01 cm

And why does other software get it right, then? And why can I see for correct PDFs with format 410x310mm that pdfcpu outputs 1162.20, 878.74 pt? This looks like floating point to me. But even if I use this points in Affinity Publisher (switching to points from mm) and then export again I still get 1162.32, 878.88 which is wrong again.

This is a rounding bug. Or do I miss something here? 

Edited by orschaef
Link to comment
Share on other sites

Really wondering what is taking so long here. I think it is a matter of priority. But I always thought that PDF export is something like a core feature of such software. I also wrote on Twitter to the official Affinity account and got the reply:

"This is something that is still being looked into by our developers I'm afraid."

 

 

Link to comment
Share on other sites

  • 10 months later...

This seems to have nothing to do with unit conversion accuracy and exists until now with v2.1.1. You can perform this simple test that fails. In my latest case, I create the initial doc in Designer with 51p x 66p dimensions with asymmetrical bleed of 0p and 0p9 and generate a PDF with bleeds from it. Then, I create an empty doc in Designer with the same dimensions & bleeds and open the previously exported PDF in it: the PDF does not fit quite by far. Advise, please.

Link to comment
Share on other sites

  • Staff

Hi @eworkflow,

This thread is in the V1 section of the Affinity Forums and therefore not the correct place to report issues within V2 - can you please create a report in the relevant V2 section for your specific OS type, including as much information and sample files, if possible?

https://forum.affinity.serif.com/index.php?/forum/71-bug-reporting/

Many thanks in advance!

Please Note: I am now out of the office until Tuesday 2nd April on annual leave.

If you require urgent assistance, please create a new thread and a member of our team will be sure to assist asap.

Many thanks :)

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.