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

White borders after PDF export on top and right edge


Recommended Posts

Apparently the problem isnt fixed yet, since im currently having the same issue.

In my case theres a fine thin line on the exported jpgs all around and a thick one on top and a smaller one on the right on the eps export.

Anybody know how to deal with this? Im Exporting under export persona and working with mm - tried force pixel alignment and whole numbers in the position - no fix yet.

iMac (Retina 5K, 27-inch, 2017), 4,2 GHz Intel Core i7, 64 GB 2400 MHz DDR4, Radeon Pro 580 8192 MB, ROG PG348Q

Link to comment
Share on other sites

  • 1 month later...

On the previous page I had quite a comprehensive discussion with @serif, but they did not agree with us, and this is not a problem, so there is nothing to fix. All you can do is to change your document units to px and make sure everything is a whole number. Like arboard size is whole px numbers and artboard placement coordinates are whole px units. This will do the trick.

I wish I could get back the time I spend in the last two years just fiddling with this issue...

Branding, Identity Design, UI/UX Design.    |    https://whitex.design

Link to comment
Share on other sites

On 3/6/2020 at 6:41 PM, WhiteX said:

On the previous page I had quite a comprehensive discussion with @serif, but they did not agree with us, and this is not a problem, so there is nothing to fix. All you can do is to change your document units to px and make sure everything is a whole number. Like arboard size is whole px numbers and artboard placement coordinates are whole px units. This will do the trick.

I wish I could get back the time I spend in the last two years just fiddling with this issue...

Well it does not fix it for me. Its the same for the export persona. If i export artboards there, theres a faint white border around it. If i export it without the persona it works just fine... 

Saying this isn't a problem is a bit disappointing to hear to say the least....

iMac (Retina 5K, 27-inch, 2017), 4,2 GHz Intel Core i7, 64 GB 2400 MHz DDR4, Radeon Pro 580 8192 MB, ROG PG348Q

Link to comment
Share on other sites

On 12/2/2017 at 2:46 PM, R C-R said:

@WhiteX You can override "Force Pixel Alignment" temporarily by holding down the alt/option key as you drag or draw. This is not a workaround for a bug. The app is just doing what you tell it to, so if you include something that is not pixel-aligned & on an edge of your document, then on export to a raster image format the fractional pixels you have created by doing that must be converted to whole pixels.

@farbenfeuer see the above. The app just does what you tell it to do. However I still think this is not how it should behave, especially on export persona.

@R C-R If the exported image wouldn't contain the 1px empty lines where the rounding happens, it would be a much better option. So if a file is 2344.45px wide, it should be converted to 2344px instead of 2345px, and the white lines would disapper.

Branding, Identity Design, UI/UX Design.    |    https://whitex.design

Link to comment
Share on other sites

  • 6 months later...

I have the same issue when exporting to PDF. I have a document that is set to be 262.35 mm x 163.975 mm at 264 dpi and when I export it to a PDF (with nothing rasterized) I still got white borders on the right and bottom. The size of the PDF is slightly changed too.

However, I managed in the past to get some PDF with no white border and maybe I didn't check an option or changed something in my document that I'm not aware of. If anyone could help... :)

If that's about pixel alignement I don't get it... What do pixels have to to with this since everything is vectorial? :D

test.pdf test.afdesign

Link to comment
Share on other sites

45 minutes ago, Zaxonov said:

I have the same issue when exporting to PDF. I have a document that is set to be 262.35 mm x 163.975 mm at 264 dpi and when I export it to a PDF (with nothing rasterized) I still got white borders on the right and bottom. The size of the PDF is slightly changed too.

However, I managed in the past to get some PDF with no white border and maybe I didn't check an option or changed something in my document that I'm not aware of. If anyone could help... :)

If that's about pixel alignement I don't get it... What do pixels have to to with this since everything is vectorial? :D

test.pdf 5.57 kB · 0 downloads test.afdesign 81.99 kB · 0 downloads

In Affinityland, pixels are dominant. The user may specify another unit of measurement, but that is merely for display and input of sizes while the under-the-hood measurements are in pixels.

Notice that an Affinity document always has a DPI (which is more correctly known as PPI - pixels per inch - but that's another story). It is that value which is used to convert between physical unit measurements used in the user interface and the pixel measurements that are really in the Affinity document.

Your document size is shown in millimetres to be 262.35 x 163.975, which is 10.329 x 6.456 inches. 
The DPI is 264, so the document size is really 2726.787 x 1704.307 pixels.

The PDF exporter rounds up the page dimensions to integer quantities of 2727 x 1705 pixels, but without scaling the page content (the dark rectangle), hence the empty right and bottom borders are introduced.
Because the DPI is 264, these integer pixel quantities are equivalent to 10.33 x 6.458 inches
The PDF unit of measurement is the point, which is 1/72 inch, so the PDF is exported with size 743.727 x 465 points.

So why does the PDF exporter do that rounding up of the page size to integer pixels? I don't know. It may be in the app's own code or it may be in the code of a third party library used by the exporter.

 

 

Link to comment
Share on other sites

52 minutes ago, anon2 said:

In Affinityland, pixels are dominant. The user may specify another unit of measurement, but that is merely for display and input of sizes while the under-the-hood measurements are in pixels.

Thanks for your answer :) If that's true, I find this really really stupid... pixels are the least accurate choice especially if you can have 6 decimal in millimeters in this app. At least I don't grasp the idea behind this... the dpi Even if the exporter rounds up the value, why adding white borders? The software that will read the PDF will compute accordingly the pixels to display the anyway... 

However, with your explanation, I changed my dpi to get integer value of pixels at least in one dimension and cropped the other one and I have no longer white border. Thanks ! :)

I also understand why I didn't get white borders before. For my first version of the document I chose integer pixels width of 2732px at 264 dpi to match the iPad Pro display informations given by Apple. However, my document has some millimeter grid (not the one I posted) and the result wasn't quite accurate when compared to physical millimeter grid. I suppose the 264 dpi number that Apple gives is a rounded number. 

That's the reason why I was tinkering with other size in millimeters to make it match a physical millimeter grid. I do that empirically and the 262.35 from is just one test like any other and may not be right. Since my physical grid maybe not be accurate either, it would help me if Apple gave more accurate screen size but that interest almost nobody :D I google those informations with no success :)

Link to comment
Share on other sites

5 minutes ago, Zaxonov said:

pixels are the least accurate choice especially if you can have 6 decimal in millimeters in this app

Affinity apps work with far greater precision than 6 decimal places. You can choose up to 6 decimal places for the display of numbers in various units, including pixels, but that is only the displayed precision while actual values are much more precise.

Link to comment
Share on other sites

1 hour ago, anon2 said:

Affinity apps work with far greater precision than 6 decimal places. You can choose up to 6 decimal places for the display of numbers in various units, including pixels, but that is only the displayed precision while actual values are much more precise.

OK then... That doesn't explain the reason why they add white borders to PDF export. I do some dark theme lecture notes using LaTeX to ease the readers eye so the background is dark. If I want to include a 17cm x 5 cm graphics in that document, I don't want white borders to appear just because the dimensions were not a integer value of pixels. They would be really apparent is such documents...

EDIT: Maybe it's a limitation of the PDF format?

EDIT2: Well in this case the white border won't show since it's not white but transparent borders, but that's still incomprehensible to me why the exported PDF size has to be that inaccurate... 

Link to comment
Share on other sites

4 hours ago, Zaxonov said:

OK then... That doesn't explain the reason why they add white borders to PDF export. I do some dark theme lecture notes using LaTeX to ease the readers eye so the background is dark. If I want to include a 17cm x 5 cm graphics in that document, I don't want white borders to appear just because the dimensions were not a integer value of pixels. They would be really apparent is such documents...

EDIT: Maybe it's a limitation of the PDF format?

EDIT2: Well in this case the white border won't show since it's not white but transparent borders, but that's still incomprehensible to me why the exported PDF size has to be that inaccurate... 

This problem is not a limitation of PDF format. It is erroneous exporting by Affinity apps. The same incorrect expansion of the canvas size to be equivalent to integer pixel dimensions (based on the Affinity document DPI) happens with Affinity's SVG and EPS exports. That expansion is understandable for exporting to a raster image file where there can be no fractional pixels, but it should not be happening when exporting to a vector file format. Other apps are capable of exporting to these vector file formats with the correct size.

 

Link to comment
Share on other sites

4 minutes ago, anon2 said:

 That expansion is understandable for exporting to a raster image file where there can be no fractional pixels, but it should not be happening when exporting to a vector file format. Other apps are capable of exporting vector formats with the correct size.

That's what was I thinking too and that's why I was very confused. But since the issue is known for 6 years I had doubt. I was actually looking on the web about the PDF specifications and PDFLib and couldn't find anything on some kind of limitation... Thanks for the insight :)

Link to comment
Share on other sites

  • 7 months later...
5 hours ago, Stella_88 said:

Are there any other reasons this white border can appear? 

Antialiasing caused by zoom factor vs image resolution vs computer display resolution.
Apple's Preview app will often display white borders in PDFs when there are none.

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

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.