Modify

Opened 4 years ago

Last modified 5 weeks ago

#14278 new defect

[Patch] Plugin not printing any map

Reported by: skyper Owned by: team
Priority: blocker Milestone:
Component: Plugin print Version:
Keywords: template_report map view regression Cc: Hb---

Description (last modified by skyper)

What steps will reproduce the problem?

  1. load some data
  2. open printing dialog
  3. click on checkbox "Map preview"

What is the expected result?

Render the map preview within the dialog

What happens instead?

Only scale bar and contribution is rendered but no map

Please provide any additional information below. Attach a screenshot if possible.

Actual printing produces the same empty page without a map but only scale bar and contribution text.
screenshot 1 screenshot 2

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-01-22 21:57:07 +0100 (Sun, 22 Jan 2017)
Build-Date:2017-01-23 02:32:02
Revision:11488
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11488 en) Linux Debian GNU/Linux 8.7 (jessie)
Memory Usage: 483 MB / 882 MB (292 MB allocated, but free)
Java version: 1.8.0_111-8u111-b14-2~bpo8+1-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-8-jre:amd64-8u111-b14-2~bpo8+1
Java ATK Wrapper package: libatk-wrapper-java:all-0.30.4-3
Program arguments: [--language=en]
Dataset consistency test: No problems found

Plugins:
+ print (33118)

Attachments (9)

josm_print_no_preview.png (28.8 KB) - added by skyper 4 years ago.
screenshot 1
josm_print_map_preview.png (31.9 KB) - added by skyper 4 years ago.
screenshot 2
14278-print-1.patch (19.0 KB) - added by hiddewie 11 months ago.
printer1.JPG (434.1 KB) - added by hiddewie 11 months ago.
14278-print-1.pdf (121.8 KB) - added by hiddewie 11 months ago.
Screenshot from 2020-06-28 18-26-56.png (127.0 KB) - added by hiddewie 7 months ago.
Screenthot patch 2
14278_--_Print_patch.patch (20.3 KB) - added by hiddewie 7 months ago.
Patch 2
print_custom.jar (64.0 KB) - added by hiddewie 5 weeks ago.
Custom compilied print plugin with patch 2 applied
JOSM Print screen.jpg (225.8 KB) - added by compassb 5 weeks ago.
Preview from Print_custom Version 35458

Download all attachments as: .zip

Change History (22)

Changed 4 years ago by skyper

Attachment: josm_print_no_preview.png added

screenshot 1

Changed 4 years ago by skyper

Attachment: josm_print_map_preview.png added

screenshot 2

comment:1 Changed 4 years ago by Don-vip

Keywords: regression added
Priority: normalmajor

comment:2 Changed 2 years ago by Peter M.

I encounter the same issue with the Print plugin version 34576 running in JOSM version 14178. Additionally, when proceeding to print the page, the output at the printer is the same as the preview (a bank page except the scale bar).

comment:3 Changed 2 years ago by Hb---

Cc: Hb--- added

Same defect here on Windows 64 bit.

comment:4 Changed 18 months ago by skyper

Description: modified (diff)
Priority: majorblocker

The plugin does not work at all. No preview and no map printed.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-07-23 21:47:40 +0200 (Tue, 23 Jul 2019)
Build-Date:2019-07-24 01:30:51
Revision:15262
Relative:URL: ^/trunk

Plugins:
+ print (34972)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Region [TMS_BLOCK_v2] Resetting cache

comment:5 Changed 18 months ago by skyper

Summary: Map preview not working in printing dialogPlugin not printing any map

Changed 11 months ago by hiddewie

Attachment: 14278-print-1.patch added

Changed 11 months ago by hiddewie

Attachment: printer1.JPG added

Changed 11 months ago by hiddewie

Attachment: 14278-print-1.pdf added

comment:6 Changed 11 months ago by hiddewie

I tried some things for this issue. It seems the bounds are wrong, and nothing is painted. When using the main map bounds some parts of this issue is solved.

Attached is a patch.

Still some problems remain in the print plugin:

  • It seems the center of the main map is taken as the top left corner of the printing map. This rectange stays the same size relative to the page size, and does not changes when changing the resolution of the printed map. See the attached PDF for an example.
  • There is a tiny rectangle in the top left where lines are painted. The rest of the map only consists of nodes and land usage (areas).
Last edited 11 months ago by hiddewie (previous) (diff)

comment:7 Changed 7 months ago by skyper

Summary: Plugin not printing any map[Patch] Plugin not printing any map

@hiddewie: If you attach patch, please, add [Patch] to the summary of the ticket to have it listed under report/8.

comment:8 Changed 7 months ago by hiddewie

I updated the patch slightly. This update solves the first remaining point in comment:6.

Changed 7 months ago by hiddewie

Screenthot patch 2

Changed 7 months ago by hiddewie

Attachment: 14278_--_Print_patch.patch added

Patch 2

comment:9 Changed 5 weeks ago by compassb

Have these patches ever been submitted? In Windows 10 the Print plugin still behaves exactly as when this ticket was opened, even though I update the plugins. In other words the plugin still does not work. If there is a way to install the patch locally, I am probably incapable of doing it.

comment:10 Changed 5 weeks ago by hiddewie

@compassb The patches are attached as attachments to this ticket. You can apply it by cloning the JOSM source code (with plugins), using patch [1] to apply the patch, and building JOSM from source. The patch has not been merged to the code in the main branch because is does not yet fully solve the issue of non-printing maps.

[1] https://www.howtogeek.com/415442/how-to-apply-a-patch-to-a-file-and-create-patches-in-linux/

comment:11 in reply to:  10 Changed 5 weeks ago by Hb---

Replying to hiddewie:
Please feel free to upload the half-patched plugin jar-file here.

Changed 5 weeks ago by hiddewie

Attachment: print_custom.jar added

Custom compilied print plugin with patch 2 applied

comment:12 Changed 5 weeks ago by hiddewie

@compassb I attached the patched, compiled print plugin. You can add it to your plugins folder as described in https://wiki.openstreetmap.org/wiki/JOSM/Plugins#Installation, and then activate it in the JOSM preferences.

Changed 5 weeks ago by compassb

Attachment: JOSM Print screen.jpg added

Preview from Print_custom Version 35458

comment:13 Changed 5 weeks ago by compassb

Thank for the prompt response to my query and for the jar file. The only improvement I get is that something, at least, shows up. But it is just a small central part and only an area bound (faint green) and a road name, as described in comment 6. See attached image. Changing scale just reduces/increases the two visible items. Don't spend more time on this just for me; I can use screenshots for what I need.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to skyper
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.