Modify

Opened 7 years ago

Last modified 16 months 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---, lowelg@…

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

Download all attachments as: .zip

Change History (26)

by skyper, 7 years ago

Attachment: josm_print_no_preview.png added

screenshot 1

by skyper, 7 years ago

Attachment: josm_print_map_preview.png added

screenshot 2

comment:1 by Don-vip, 7 years ago

Keywords: regression added
Priority: normalmajor

comment:2 by Peter M., 6 years ago

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 by Hb---, 5 years ago

Cc: Hb--- added

Same defect here on Windows 64 bit.

comment:4 by skyper, 5 years ago

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 by skyper, 5 years ago

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

by hiddewie, 4 years ago

Attachment: 14278-print-1.patch added

by hiddewie, 4 years ago

Attachment: printer1.JPG added

by hiddewie, 4 years ago

Attachment: 14278-print-1.pdf added

comment:6 by hiddewie, 4 years ago

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 4 years ago by hiddewie (previous) (diff)

comment:7 by skyper, 4 years ago

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 by hiddewie, 4 years ago

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

by hiddewie, 4 years ago

Screenthot patch 2

by hiddewie, 4 years ago

Attachment: 14278_--_Print_patch.patch added

Patch 2

comment:9 by compassb, 3 years ago

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 by hiddewie, 3 years ago

@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/

in reply to:  10 comment:11 by Hb---, 3 years ago

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

by hiddewie, 3 years ago

Attachment: print_custom.jar added

Custom compilied print plugin with patch 2 applied

comment:12 by hiddewie, 3 years ago

@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.

by compassb, 3 years ago

Attachment: JOSM Print screen.jpg added

Preview from Print_custom Version 35458

comment:13 by compassb, 3 years ago

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.

comment:14 by skyper, 18 months ago

Ticket #22523 has been marked as a duplicate of this ticket.

comment:15 by taylor.smock, 16 months ago

Ticket #22682 has been marked as a duplicate of this ticket.

comment:16 by skyper, 16 months ago

Ticket #22692 has been marked as a duplicate of this ticket.

comment:17 by skyper, 16 months ago

Cc: lowelg@… added

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.