drawio icon indicating copy to clipboard operation
drawio copied to clipboard

Placeholders with page specific information don't print / export properly with multiple pages

Open OPSeqT opened this issue 11 months ago • 6 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.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should report bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug When I print (or export) a multi-page drawing with placeholders (e.g. %page% or %pagenumber%) defined on a background page, the printed placeholders do not change correctly according to the page. Instead the placeholder value for all pages is the same.

To Reproduce Steps to reproduce the behavior:

  1. Create a background page containing placeholder text "%page%" (to display page title on each page)
  2. Ensure the "placeholder" property of the text object on background page is checked.
  3. On each page of drawing, open the format pane for the diagram and ensure the background page is assigned as background.
  4. Check that the page title is correctly displayed on each page.
  5. Print all (or any page(s)) of the drawing. The placeholder values do not change correctly to show the page title. Instead all pages show the placeholder value for the page that was selected (in focus) when choosing the print command. Expected behavior When printing multiple pages with placeholders on a background page, the printed page should display placeholder value for each page correctly, not the placeholder value for the page that was in focus when choosing print from menu.

Screenshots

1st page on screen: Image

2nd page on screen: Image

2nd page printed (as pdf and then opened and screenshot, but is the same if you print a physical copy): Image

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

  • draw.io version 26.0.4

Desktop (please complete the following information):

  • OS: [Windows 11]
  • Browser [chrome]
  • Browser Version [131.0.6778.265]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

  • yes

Additional context It is not just the %page% placeholder that is affected, but also "%pagenumber%. I haven't tested others. The problem is the same for printing physical copies, printing to pdf (e.g. with Microsoft Print to Pdf), or exporting to pdf. I am not using the browser version, but the desktop version. However I have tested in the browser version (incognito, with extensions turned off) and the same problem exists. This is really annoying when using the background page as e.g. an engineering template with page titles and numbers.

OPSeqT avatar Jan 16 '25 14:01 OPSeqT

This is the file I used in example for this issue report: test.drawio.zip

OPSeqT avatar Jan 16 '25 14:01 OPSeqT

i found the following on their Website:

Secure PDF generation By printing directly to a PDF file via File > Print, your diagram data is never transferred outside your own system. If you choose to export your diagram to a PDF file instead, your diagram is sent to the draw.io server to use the PDF generator hosted there, and deleted from the server as soon as the PDF file is returned.

SyrillBigler avatar Feb 07 '25 09:02 SyrillBigler

@SyrillBigler what has that got to do with the original problem?

davidjgraph avatar Feb 07 '25 09:02 davidjgraph

I wasn't very clear, sorry. I wanted to show, that even though the PDFs are generated differently, both ways show the same behaviour regarding Placeholders not being interpreted properly.

SyrillBigler avatar Feb 07 '25 09:02 SyrillBigler

Thanks for clarifying. My original post did highlight that the problem exists whether printing or exporting but it’s certainly helpful to know that others are able to reproduce this issue.

OPSeqT avatar Feb 07 '25 10:02 OPSeqT

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 Oct 15 '25 11:10 github-actions[bot]