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

After exporting a document as PDF, the document gets a white border at the edge on top and on the right hand side. This document has an image as background.

When I create a vector, color filled rectangle as background and export it as PDF, there are no borders.  

 

What is the reason for this behavior?

 

Original page in AD:

post-2802-0-76223500-1415781888_thumb.png

 

Page with border after export as PDF:

post-2802-0-97307500-1415781889_thumb.png

 

The rectangle PDF version:

Untitled.pdf

 

Thanks,

Martin

Link to comment
Share on other sites

  • Staff

I've just tried the following:

 

- New A4 document

- Added an image and stretched it to go past the bounds of my page in all directions

- File->Export, choose PDF and hit OK

 

The resulting PDF file goes right to the edges and (when opened in Affinity) contains the whole original image, stretched to its extents past the document bounds - exactly as I'd expect. I've attached the PDF I generated here:

 

test.pdf

 

Did you choose File->Print, then Save PDF by any chance? That will create the PDF that would've been sent to the printer - and it will clip away the printable area of the document.

 

Thanks,

Matt

Link to comment
Share on other sites

  • 2 years later...
  • 4 weeks later...
  • 6 months later...

Hello MEB,

I have just uploaded the afdesign file to your Dropbox account.

If I use the 'whole document' option both for web and for print presets, the issue occurs on Artboard4 and Artboard5. However, everything works smoothly if I choose to export only Artboard4 or Artboard5 areas.

Thanks!

Link to comment
Share on other sites

  • Staff

Hi Clara Montseny,

This is happening because the Artboard 4 and 5 - X,Y's coordinates are not integer values/are not aligned with the pixel grid.

Do the folowwing: select the artboard 4 layer in the Layers panel, change to the Move Tool if not selected already then go to the Transform panel and set the X,Y coordinates to integer values - in this case set the X to 1190 and the Y to 0 (zero). Do the same for the artboard 5 layer then export the file. It should export correctly with no white edges.

To prevent this from happening when you duplicate/move an artboard make sure Force Pixel Alignment is enabled. You can turn it on going to menu View ▸ Snapping Manager... ticking the respective box there, or enable it clicking the Force Pixel Alignment icon in the main toolbar (on the magnet icon group - it's the icon on the left).

Link to comment
Share on other sites

  • 1 month later...
2 hours ago, WhiteX said:

:) I think this needs to be fixed in the software, it needs to be fool-proof. Thanks!

It is just about impossible to make any software targeting 'pro' users foolproof -- inevitably, that leads to removal of features some will want to exploit for one reason or another.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

On 12/1/2017 at 1:53 PM, MEB said:

If you enable Force Pixel Alignment from the beginning as suggested you shouldn't have to deal with those issues.

Thank you for the suggestion, it really works, and saves me the time of the extra step of cropping the white edges after exporting. The problem is having the Force Pixel Alignment option always active is not something I want, forcing pixel alignment in illustration or logo design in most of the cases makes impossible to create the desired shape or arrangement, especially with this nice 1m% zoom feature, when you zoom in, 1px becomes a pretty big space.

 

21 hours ago, R C-R said:

It is just about impossible to make any software targeting 'pro' users foolproof -- inevitably, that leads to removal of features some will want to exploit for one reason or another.

I understand that, but we're talking about a bug now, it has some workarounds, you can fix it with temporarily changing the settings, but it's still a bug. When we drag Artboards, it would be great if they would move only with whole units then, we don't really want to artistically arrange the Artboards, where even half a pixel counts, but having the white pixel edges is really bothersome if we forget to activate that option. Anyway, having a perfect cut without artifacts, wherever is the Artboard placed is an expected behavior in my opinion :)

 

 

Update:

Forcing Pixel Alignment does not solve the problem when the document measurements are not Pixels. A have many of my design projects set to A4 artboard sizes, even if the coordinates are whole units, the exported images have the white edges. Mostly because translating the physical A4 size to "computer units" (pixels), the resulted values are not whole numbers. Unfortunately in this case checking Force Pixel Alignment when moving Artboards does not solve the problem.

Edited by WhiteX
Update

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

Link to comment
Share on other sites

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

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Thank you for your response @R C-R, I really appreciate that you're trying to help. Unfortunately the temporary override does not work for me. As far as I know, holding Alt/Option while dragging, makes a duplicate of the object (that's how I duplicate the Artboards too). Holding Alt/Option after starting the dragging action, does not have the desired effect either.

 

I could get comfortable using the "Force Pixel Alignment" while I duplicate my artboards, but I still feel that there are two problems remaining:

1. When I have a document that does not have pixel perfect size (A4, for example, or any other Print/Physical size), it's impossible to place an artboard in a position that does not result in a white edge after exporting.

2. If the software just does what I tell it, I'd like to learn how to tell it, that I need those extra pixels that are converted from fractional pixels to have the color of its neighbors (or - preferably - the color of the original pixel that got divided), but not white. That's not accurate and looks very ugly too :( The white edge appears even if I put a dark background layer, that's bigger than the artboard. The clipping looks fine in the viewport / editor, but the white edges appear on export.

 

Thanks again!

 

 

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

Link to comment
Share on other sites

49 minutes ago, WhiteX said:

Holding Alt/Option after starting the dragging action, does not have the desired effect either.

What happens when you try it? If you temporarily (if needed) set your document units to pixels & monitor sizes & positions in the Transform panel, do you not see a difference when the alt/option key is held down vs. when it is not?

 

1 hour ago, WhiteX said:

1. When I have a document that does not have pixel perfect size (A4, for example, or any other Print/Physical size), it's impossible to place an artboard in a position that does not result in a white edge after exporting.

What PDF export settings are you using? If you use the 'whole document' option & you have more than one artboard in the document, then you need to make sure the x & y coordinates of each artboard's upper left edge are integer pixel values, but aside from that, as long as the artboard's content extends to or beyond the edges, there should be no white edges.

1 hour ago, WhiteX said:

2. If the software just does what I tell it, I'd like to learn how to tell it, that I need those extra pixels that are converted from fractional pixels to have the color of its neighbors (or - preferably - the color of the original pixel that got divided), but not white.

I am not sure what you mean by this. A pixel can have only one color so how could one pixel have the same color of its neighbors if its neighbors do not all have the same color?

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

When I press Alt/Option after I start dragging, disables snapping temporarily. If I change document units to pixels and start the dragging and press and hold Alt/Option, happens the same. If I hold Alt before start dragging, then makes a duplicate as expected. Maybe it's a different key that forces pixel alignment temporarily, but this is not really a problem.

 

I export these images in JPG now, from the export persona. I suppose it does not matter what the output file format is, the artboard cutting happens the same way. When I have a custom document size or one resulted from creating a document with the help of the Print presets, the size won't be a whole pixel size, the other Presets result in a whole pixel size (even the Photo preset).

 

Here's what I mean by colors of Fractional Pixel rows:

 

Xx1DWq9.jpg

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

Link to comment
Share on other sites

1 hour ago, WhiteX said:

When I press Alt/Option after I start dragging, disables snapping temporarily. If I change document units to pixels and start the dragging and press and hold Alt/Option, happens the same. If I hold Alt before start dragging, then makes a duplicate as expected. Maybe it's a different key that forces pixel alignment temporarily, but this is not really a problem.

It is the alt/option key pressed after starting the drag, but it temporarily disables (overrides) "Force Pixel Alignment," as it does for snapping. It does not force alignment.

1 hour ago, WhiteX said:

Here's what I mean by colors of Fractional Pixel rows:

What does "Neighbor Pixel Outside Artboard" represent? Is it part of some object on the artboard or something else? It would be a lot easier to understand what you mean if you would include a sample .afdesign file with an artboard that is causing problems for you.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Okay, it was a false assumption that holding Alt/Option enables "Force Pixel Alignment", now I understand you were suggesting the opposite, to keep it always enabled and hold Alt/Option when I don't need that. Got that, thanks, however in most of the cases I won't need this, so I'm going to keep it disabled and enable it while dealing with Artboards. Thanks again.

 

I made some experimenting and here are the results:

Step 1. I created a document with A4 preset size (210mm / 297mm - no artboard)

Step 2. Filled the background with a shape bigger than the document size

Step 3. Exported the file from File Menu (Ctrl+Alt+Shift+S), in JPG file format

            Export Resulted with no white edge where the fractional pixel lines were.

Step 4. I created an artboard with snapping, so the resulted size is exactly A4 (210mm / 297mm)

Step 5. Exported the file from File Menu (Ctrl+Alt+Shift+S), in JPG file format

            a. Whole Document: Resulted with no White Edge.

            b. Selected Artboard: Resulted with no White Edge.

Step 6. Exported the File from Export Persona, in JPG format

            a. Whole Document: Resulted with no White Edge.

            b. Artboard Slice: Resulted with a White Edge on Right side.

 

So it's only the Slices that cause this from the Export Persona I think. Although, that's what I use in 95%, when I have dozens of Artworks in a documents on different artboards. They all have these ugly white borders when I export them. Now I know that I need to do some setup, to look at pixel values, coordinates, export settings, but it would be nice, if we wouldn't need to care about all this, and could export the designs from the Export Persona too, without worrying about the white edges. So the software definitely can do that (see other cases), but it needs some adjustments in this "edge case" :)

White Edge 2.afdesign

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

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.