Fix Unwanted Dashed Lines in MATLAB Exported PDFs
Question details
The user needs to eliminate white dashed lines that appear on graphics exported as PDFs from MATLAB, which do not appear in rasterized versions or other design software.

- Product
- MATLAB / PDF
- Device & OS
- not provided
- Scenario
- Exporting vector graphics from MATLAB to a PDF document.
- Observed behavior
- Unwanted white dashed lines or grid-like artifacts appear across the graphic in the exported PDF.
Before adjusting your MATLAB export settings, try opening the exported PDF in a different PDF reader to verify if the dashed lines are embedded in the file or just a temporary on-screen rendering artifact.
Adjust PDF Export and Compression Settings
Switching to a higher resolution preset prevents the PDF creation process from heavily compressing images and causing rendering artifacts.
White dashed lines are often visual glitches caused by aggressive image compression, transparency flattening, or low-resolution settings during the PDF creation process. Bumping up the output quality typically resolves this.
In MATLAB, select your figure and navigate to File, then click on Export Setup.
Go to the rendering or printer properties section associated with your PDF export.
If you are using a PDF printer or distiller, change the conversion settings preset from 'Standard' to 'Press Quality' or 'High Quality Print'.
Turn off aggressive downsampling for images and ensure the resolution is set to at least 300 DPI, then re-export the PDF.
Export as a High-Resolution Raster Image First
If vector PDF export continues to fail, exporting as a raster image and converting it to PDF bypasses vector rendering bugs.
Verify and Manage PDF Graphics with WPS PDF
Use WPS Office's built-in PDF viewer to accurately render your MATLAB-exported files without visual artifacts, or use it to easily convert high-quality images into flawless PDF documents.
- 1. Launch WPS Office: Open WPS Office on your device and navigate to the PDF module.
- 2. Open the MATLAB PDF: Drag and drop the PDF exported from MATLAB into the workspace to view it with a high-fidelity rendering engine.
- 3. Inspect for Artifacts: Zoom into the graphic to check if the dashed lines persist. If they disappear, it was merely a rendering issue in your previous software.
- 4. Convert if Necessary: If you need a rasterized version, use the 'PDF to Picture' tool in the Home tab to safely export the graphic without vector glitches.

Frequently Asked Questions
Why do white dashed lines appear on my vector PDF?
These lines are typically rendering artifacts caused by how specific PDF viewers interpret complex overlapping vector paths, transparency flattening, or aggressive image compression from the original MATLAB graphic export.
Will the dashed lines appear if I print the PDF physically?
Often, these artifacts are only visible on-screen due to low-resolution display rendering engines. They frequently do not appear in the final printed document. You can test print a single page to confirm.
How do I change PDF compression settings for better quality?
When saving or printing to PDF, access the printer properties or export settings dialog. Choose professional presets like 'Press Quality' or 'High Quality Print,' and disable 'downsample images' or set the PPI to a minimum of 300.
Does the PDF viewer software affect how these lines are displayed?
Yes. Different PDF viewers use different rendering algorithms. A file that displays thin dashed lines in a lightweight web browser viewer might look perfectly clean in a dedicated application like WPS PDF or Adobe Acrobat.




