Apache OpenOffice (AOO) Bugzilla – Issue 16293
Page size limit too low if using UnoGraphicExporter via basic macro
Last modified: 2004-04-28 10:30:39 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.
AFAIK there is a sense for a limited page size and the export. Sven, please add some comments. Thanks in advance.
Reassigned to Sven.
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
changed status
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).
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.
SJ->SAB: Thanks for taking of this issue. The graphic exporter is located in svx/source/unodraw/unoGraphicExporter.cxx
I take it
saved in sab013 in svx/source/unodraw/UnoGraphicExporter.cxx
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.
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.
please verify
Is there any binary distribution I can download to test the bug too?
The fixed does not seem to work.
Back to Sascha.
ok, also fixed for selected objects
Set to fixed.
Verified in CWS.
Tested in master. Closed.