Issue 16293 - Page size limit too low if using UnoGraphicExporter via basic macro
Summary: Page size limit too low if using UnoGraphicExporter via basic macro
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC All
: P3 Trivial with 2 votes (vote)
Target Milestone: OOo 2.0
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-01 15:12 UTC by arielt
Modified: 2004-04-28 10:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description arielt 2003-07-01 15:12:30 UTC
First, I'll put my task this way: I try to produce a poster using sdraw.
(This may not be the original goal of sdraw, but I don't see why not use
the great Linuxian drawing tool for the purpose.)

The problems are twofold:

1.  There is a page size limit: 119cm x 119cm.
    This limit turns to be low when one attempts to publish a poster.
    Actually, I don't see why not increase this limit (or remove it totally).
    I assume this limit was set arbitrarily, and is not a built-in limit.
    If this is so I ask to increase it.

2.  Now, the other problem is the export to an image file (my publisher can
    print very large images, but may entangle problems if I bring a PostScript
    file).  The problem is that there is no possibility to control the
    resolution of export (as far as I could find).
    This means that a 119cm x 119cm page is exported to about 2000x2000 pixels
    image.  No doubt, this resolution is unreasonable, and this is why I
    classify this issue as: defect.
    I suggest to put a page property: resolution, so regardless of the type of
    image, the image will be exported with the correct number of pixels.

Pay attention that many people in the academic world need to publish posters
at conferences, and (like myself) would be willing to use the drawing
capabilities of sdraw, especially due to the possibility to easily add formulae
into drawings.
Comment 1 wolframgarten 2003-07-02 07:17:35 UTC
AFAIK there is a sense for a limited page size and the export. Sven,
please add some comments. Thanks in advance.
Comment 2 wolframgarten 2003-07-02 07:18:01 UTC
Reassigned to Sven.
Comment 3 sven.jacobi 2003-07-04 10:25:36 UTC
Hi,
please do not describe more than one problem in a single Issue, this
makes it unnecessary complicate to handle the bug, but in this case it
does not matter, because one problem is double to another.

The problem which is described in the first point will be fixed. 

The other problem is already addressed in(Issue4499), I am sure we
will offer a better solution for OOo2.0. But if you are firm with
basic macros, you have another possibility by now, you can export a
page or selection using a basic macro. In the following basic macro
you can provide the pixel size of the graphic you want to create. It
is just exemplary and will create a png having a resolution of
3000*3000 pixels.

Sub ExportCurrentPageOrSelection
'creating filter dependent filter properties
Dim aFilterData (2) as new com.sun.star.beans.PropertyValue
aFilterData(0).Name  = "Compression"
aFilterData(0).Value = 5
aFilterData(3).Name  ="PixelWidth"
aFilterData(3).Value = 3000
aFilterData(4).Name  = "PixelHeight"
aFilterData(4).Value = 3000
Dim sFileUrl As String
sFileUrl = "file:///c:/test.png"
xDoc = thiscomponent
xView = xDoc.currentController
xSelection = xView.selection
If isEmpty( xSelection ) then
    xObj = xView.currentPage
else
    xObj = xSelection
End If
Export( xObj, sFileUrl, aFilterData() )	
End Sub

Sub Export( xObject, sFileUrl As String, aFilterData )
xExporter = createUnoService( "com.sun.star.drawing.GraphicExportFilter" )
xExporter.SetSourceDocument( xObject )
Dim aArgs (2) as new com.sun.star.beans.PropertyValue
Dim aURL as new com.sun.star.util.URL
aURL.complete = sFileUrl
aArgs(0).Name  = "MediaType"
aArgs(0).Value = "image/png"
aArgs(1).Name  = "URL"
aArgs(1).Value = aURL
aArgs(2).Name  = "FilterData"
aArgs(2).Value = aFilterData
xExporter.filter( aArgs() )
End Sub
Comment 4 sven.jacobi 2003-07-04 10:27:02 UTC
changed status
Comment 5 arielt 2003-08-15 10:50:37 UTC
I've just tested the script, and it seems that OpenOffice 1.1RC3
is limited to 2048x2048 pixels image, even when the script says
3000x3000.  When I reduced it to 1000x1000 the script operated just
fine (except for a typo: aFilterData should be of size 4; but that's
really minor).
    OpenOffice (1.1RC3) does not exceed the 2048x2048.

If there has to be a limit (and I guess it won't be user selectable
in current release) I guess something like 30000x30000 should be set
(about 600dpi for a 119x119 image), or even 60000x60000 (1200dpi).
    I personally can get along with 200dpi (i.e., 10000x10000).
Comment 6 sven.jacobi 2003-09-12 17:16:05 UTC
Accepted, it seems that there is somewhere a protection for too huge
values. I will remove this limit if graphics are exported via
GraphicExportFilter component.


Comment 7 sven.jacobi 2004-01-15 09:36:20 UTC
SJ->SAB: Thanks for taking of this issue. The graphic exporter is located in
svx/source/unodraw/unoGraphicExporter.cxx
Comment 8 sascha.ballach 2004-01-22 10:47:55 UTC
I take it
Comment 9 sascha.ballach 2004-02-11 11:06:40 UTC
saved in sab013 in svx/source/unodraw/UnoGraphicExporter.cxx
Comment 10 juma 2004-03-19 11:33:31 UTC
Hello,
a friend asked me to search for issues connected to setting the maximum size of
a page. He is interrested in using OOWriter or OODraw to create a scientific
poster for a presentation (the poster size would be 100*200 cm). 
The problem is, that the page width and/or height can not be increased over
119*119 cm. This has been stated by several other people in issue #4219.

My confusion is due to the fact, that I found several issues connected to this
problem, obviously unaware of the existance of the other issues. Here are the
numbers of issues that I came along in my search (there might be even more): 

#4129, #9982, #16260, #16293, #25791 

(my search strings were: "page width" and "page size")

What even confuses me more is the fact, that issue #16293 claims to have solved
this problem, but still people keep searching for the answer in the other
issues. (Or havn't even started yet.)
And, I don't know in which release this solution will be integrated, or whether
this "solution" really solves the stated problems in all other issues.

Maybe, this mail may help to sort and bundle the activities on the
"page-size-problem".

PS: I will post this mail to each of the issues stated above.
Comment 11 sven.jacobi 2004-03-19 13:14:20 UTC
SJ->Changed title according to juma's search results. This bug is not double to
Issue 4219, instead it solves the page size problem if you are exporting
graphics via basic macro.
Issue 4219 is about the page size problem if exporting graphics via graphic
export dialog (therefore our user interface needs to be enhanced).

Many thanks to juma, finding so many duplicate issues.
Comment 12 sascha.ballach 2004-04-07 14:04:38 UTC
please verify
Comment 13 arielt 2004-04-07 17:41:30 UTC
Is there any binary distribution I can download to test the bug too?
Comment 14 wolframgarten 2004-04-08 11:02:48 UTC
The fixed does not seem to work.
Comment 15 wolframgarten 2004-04-08 11:03:05 UTC
Back to Sascha.
Comment 16 sascha.ballach 2004-04-14 14:45:37 UTC
ok, also fixed for selected objects
Comment 17 sascha.ballach 2004-04-15 11:47:04 UTC
please verify
Comment 18 wolframgarten 2004-04-15 12:31:47 UTC
Set to fixed.
Comment 19 wolframgarten 2004-04-15 12:32:09 UTC
Verified in CWS.
Comment 20 wolframgarten 2004-04-28 10:30:39 UTC
Tested in master. Closed.