Bug 91717 - Exporting SVG crops contents outside of page
Summary: Exporting SVG crops contents outside of page
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-29 09:51 UTC by samtuke
Modified: 2017-08-23 11:58 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Inkscape Export Panel (61.20 KB, image/png)
2015-06-03 15:53 UTC, Gabriel Diosan
Details
Draw Export dialog - Selection check box (6.83 KB, image/png)
2015-06-03 16:18 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description samtuke 2015-05-29 09:51:06 UTC
When exporting an image from an odg in Draw, instead of exporting the entire drawing (or providing an option to control this behaviour), only contents within the page area are exported, cropping content outside of that region.

Instead, all content should be exported to SVG, including contents outside of the page. Otherwise an option to control this behaviour should be provided in the export dialogue.
Comment 1 Gabriel Diosan 2015-06-03 14:33:33 UTC
Tested with the following:

LibreOffice 4.4.2.2 in the Ubuntu 15.10 repo

&

LibreOffice Version: 5.1.0.0.alpha1+
Build ID: 9f01951b858453684f2622541af0eb85d4544fc6
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-06-03_00:58:10
Locale: en-AU (en_AU.UTF-8)

In both cases any object that is not within the page boundary is cut off when exported to SVG or an image and therefore this 'bug' is reproducible. I am going to set this to NEW. An option to control the behaviour as suggested may be appropriate, however I will leave it to the UX team to decide on the best course of action.

UX Team -- please take a look at this enhancement. Thanks!

Gabriel
Comment 2 V Stuart Foote 2015-06-03 15:15:34 UTC
Sorry, believe quite the opposite. Things as are they should be.

Simply resetting the page size is--and should remain--the control for masking/croping unwanted content being exported from Draw. Similar to use of the "Artboard" in Adobe Illustrator.

Since multiple Draw objects can extend outside the page boundary, they should be completely masked/cropped/clipped to page size during an export from Draw, regardless of the export format--bitmap or vector.

Then manipulating Draw Page size is the most efficient way to consistently specify the cropping mask. In addition to its role controlling general layout work of a Draw document.

Selection/Copy and Paste of Draw objects into another LO module is effective for intra-suite handling for Draw graphics objects. And rounding it out, OLE insertion does honors page settings, but can have issues on layout and sizing. But that is an OLE drawback.

So no, leave the Draw page as is.
Comment 3 samtuke 2015-06-03 15:38:39 UTC
(In reply to V Stuart Foote from comment #2)
> Simply resetting the page size is--and should remain--the control for
> masking/croping unwanted content being exported from Draw. Similar to use of
> the "Artboard" in Adobe Illustrator.

It can be the default, but having no other alternative can lead to confusion. Draw is used extensively for handling imported images and many such images, especially vectors, do not fit on page/canvas size by deafult, for a variety of reasons. For such documents you therefore have to resize the page each time you export a different part of the image, which is cumbersome. The page is a page, after all, and not a view port. 

Perhaps this issue relates to mixed visual metaphors for traditional physical documents vs more digitally-focused data, such as SVG (used extensively for web graphics).
Comment 4 Gabriel Diosan 2015-06-03 15:53:31 UTC
Hi all

I know that Inkscape has options with regard to export, whether it be the page, selection, drawing or some custom value. I'm not sure if Draw should necessarily have all those options but it may be worth considering some of them?

Alternatively, perhaps Draw should export any objects selected even if they fall outside the page boundaries?

Just some thoughts.

I will attach an image from the Inkscape export panel just as an FYI.

Gabriel
Comment 5 Gabriel Diosan 2015-06-03 15:53:55 UTC
Created attachment 116262 [details]
Inkscape Export Panel
Comment 6 V Stuart Foote 2015-06-03 16:18:16 UTC
Created attachment 116263 [details]
Draw Export dialog - Selection check box

Actually the page is exactly a viewport during export actions.

Additionally, Draw's Export dialog already provides the option of exporting a selection (rather than the page as viewport), even if the selection extends beyond the page settings.  Seems to export correct extents for both vector and bitmap image formats.

Attached clip of the dialog...
Comment 7 Robinson Tryon (qubit) 2016-08-25 05:38:53 UTC Comment hidden (obsolete)
Comment 8 Heiko Tietze 2017-08-23 11:58:38 UTC
(In reply to V Stuart Foote from comment #6)
> Actually the page is exactly a viewport during export actions.
> ...
> Additionally, Draw's Export dialog already provides the option of exporting
> a selection (rather than the page as viewport), even if the selection
> extends beyond the page settings.

Works perfectly for me.