You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Microsoft Edge, a thin white line appears at the edge of the page when setting a background color on a Page component. The position of the white line depends on the page orientation:
In landscape mode: white line appears at the bottom
In portrait mode: white line appears on the right side
Importantly, this issue is browser-specific and does not occur in Chrome.
Reproduction Steps
Create a new React project with the following dependencies:
constPdfGenerator=()=>{return(<PDFViewerwidth="100%"height="100%"><Document><Pagesize="A4"orientation="landscape"style={{width: "100%",height: "100%",backgroundColor: "#000000",position: "absolute",top: 0,left: 0,right: 0,bottom: 0,margin: 0,padding: 0,border: "none",}}><Textstyle={{margin: 30,color: "#FFFFFF",fontSize: 14}}>
This is a page with a custom background color
</Text></Page></Document></PDFViewer>);};
Render the component in Microsoft Edge
Observe the thin white line at the edge
Expected Behavior
The background color should extend fully to all edges of the page without any white lines appearing, as it does in Chrome.
Actual Behavior
In Microsoft Edge only:
A thin white line appears at the bottom edge in landscape orientation
A thin white line appears at the right edge in portrait orientation
The issue does not occur in Google Chrome, where the background renders correctly.
Environment
@react-pdf/renderer version: 4.1.6
Next.js version: 14.2.18
Browser: Microsoft Edge
Additional Notes
Issue is reproducible only in Microsoft Edge
Works as expected in Google Chrome
The white line appears consistently:
Despite absolute positioning
Despite zero margins and padding
Despite 100% width and height
With various background colors
The issue appears in both development and production builds
Additional Context
As it seen on the image there is a thin white line at the right side
This is how I expect it to be
The text was updated successfully, but these errors were encountered:
When using Microsoft Edge, a thin white line appears at the edge of the page when setting a background color on a Page component. The position of the white line depends on the page orientation:
Importantly, this issue is browser-specific and does not occur in Chrome.
Reproduction Steps
Expected Behavior
The background color should extend fully to all edges of the page without any white lines appearing, as it does in Chrome.
Actual Behavior
In Microsoft Edge only:
The issue does not occur in Google Chrome, where the background renders correctly.
Environment
Additional Notes
Additional Context
As it seen on the image there is a thin white line at the right side
This is how I expect it to be
The text was updated successfully, but these errors were encountered: