drawio-desktop icon indicating copy to clipboard operation
drawio-desktop copied to clipboard

The exported PDF file doesn't keep the infill with a type other than "Solid" to be vectorized

Open bonapet256 opened this issue 2 years ago • 1 comments

Preflight Checklist

  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug

The exported PDF file doesn't keep the infill with a type other than "Solid" to be vectorized, checked using both Acrobat Reader and SumatraPDF.

I'm currently working on a project to convert drawio files to SVG files while keeping most of its layout and look, it utilizes the exported pdf, which keeps most elements in place and has no SVG 1.1 warning, then the pdf file will be converted to SVG using Inkscape.

During my test, the directly exported SVG files can't preserve the icons from "Allied Telesis" group and are not friendly enough for some image viewers or Microsoft Word, direct exporting is not an option in this case.

Using the PDF files seems can get this job done. But when working with shapes that have a non-solid infill, the infill gets rasterized in the exported PDF file compared to the exported SVG file. Although this won't cause much trouble in most cases, I'm assuming the vectorized infill is implemented by design, but for some reason, it missed out when exporting as PDF. It would be best If this issue can be fixed.

Anyway, thank you for your work to make this excellent software.

Update: Enabling the "sketch" option can result in a correct PDF output, and setting "jiggle=0" can make infill lines straight, but the hatch lines write out of the box.

To Reproduce Steps to reproduce the behavior:

  1. Open Draw.IO and create an empty graph
  2. Drag and drop a rectangle onto the graph
  3. Select the rectangle, change the fill type to anything other than "Auto" or "Solid", and set the infill to be colored for an easy visual check.
  4. Export both SVG and PDF files.
  5. In the SVG file, both the edges and infill are kept vectorized, but in the PDF file, only the edges are vectorized, and the infill gets rasterized.

Expected behavior The exported PDF file should keep infill vectorized as in the exported SVG file.

Screenshots rasterized infill

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 20.7.4

Desktop (please complete the following information):

  • OS: Windows10 21H2

bonapet256 avatar Jan 09 '23 22:01 bonapet256

Is the PDF from app.diagrams.net better?

davidjgraph avatar Jan 11 '23 17:01 davidjgraph

@davidjgraph No, the exported pdf from app.diagrams.net looks the same.

paloha avatar Aug 14 '23 13:08 paloha

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

github-actions[bot] avatar Jun 10 '24 03:06 github-actions[bot]

We don't have any solution to this.

davidjgraph avatar Jun 18 '24 15:06 davidjgraph