CLI add --export-area-page support for EPS format
Steps to reproduce:
- Download sample file: shapes.svg
- Run this in command line:
inkscape --export-area-page --export-type=eps shapes.svg
What happened?
- Exported file is similar to this: shapes.eps
- And there is a command line warning: "EPS cannot have its bounding box extend beyond its content, so if your drawing is smaller than the page, --export-area-page will clip it to drawing."
What should have happened?
- As @ede123 pointed out EPS format allow to add margin around the content and extend its bounding box.
- Here is the expected EPS: shapes_expected.eps I get this example with opening the sample SVG with Scribus and save it as EPS, then diffing the two files provided by Inkscape and Scribus. I modified only two lines:
--- shapes.eps
+++ shapes_expected.eps
@@ -4,7 +4,7 @@
%%Pages: 1
%%DocumentData: Clean7Bit
%%LanguageLevel: 3
-%%BoundingBox: 42 49 291 256
+%%BoundingBox: 0 0 340 298
%%EndComments
%%BeginProlog
50 dict begin
@@ -67,7 +67,7 @@
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
-%%PageBoundingBox: 42 49 291 256
+%%PageBoundingBox: 0 0 340 298
%%EndPageSetup
q 42 49 249 207 rectclip
1 0 0 -1 0 298 cm q
- As Patrick noticed this issue isn't an ESP format impossibility but also a cairo limitation.
- So the expected behavior:
- Export a correct file with correct
BoundingBox
es (and HiResBoundingBox
?).
- Leave off false warning message. If we can't supporting this feature for a long time because of cairo limitations, I suggest to provide a valid warning message as partially fix.
Inkscape Version and Operating System:
- Inkscape Version: Inkscape 1.1-dev (952cbafb, 2020-02-29)
- Operating System: Ubuntu
- Operating System version: 19.10