Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index

Hi Fernand,

some weeks ago I spoke with some guys at OOo and they know this problem.
Because of your mail, I did a quick search both at the OOo issue tracker
and the LibreOffice issue tracker.

The only information (related to that) is:

So please, go ahead and file and issue for that ... since you have some
more insight, I'd like to ask you. But I'd also like to ask whether you
could CC me (username "Christoph").

Once the bug is filed, I'll upload a document I did some time ago. I've
started to analyze the print items stored in the ODF files. So even some
versions ago, the office suite wasn't able to store half of the settings
offered in the printing dialog (that resulted in a "funny" mixture of
both saved / non-saved) items.

Thanks in advance!


Am Donnerstag, den 10.03.2011, 12:43 +0100 schrieb Fernand Vanrie:

Sinds 3.3 (windows) all PrinterSettings except the Printer Names  are no 
longer persistent and not stored  anywhere not in the profile, and not 
in the document. Within the printer settings we have the "options" who 
are not Printer specific and we have "Settings" who are bound to a 
specific printer. Both are all lost after reloading the document, We 
can  use the Printer specific settings during but only when starting the 
printing itself the choosen settings are remenbered as lo,ng the 
document stays open.

Setting the PageSizes using the API is also broken, please trie the 
included code with a printer who accept to changes the PaperSizes

PLease can someone confirm this, so i can fill a issue



REM ***** BASIC *****
Sub printdocument
Dim Doc As Object
doc = thiscomponent
Dim PrinterProperties(0) As New
Dim PaperSize As New
PaperSize.Width = 20000 ' corresponds to 20 cm
PaperSize.Height = 20000 ' corresponds to 20 cm
'PrinterProperties (0).Name= "Name"
'PrinterProperties (0).Value= "Adobe PDF"
PrinterProperties (0).Name="PaperFormat"
PrinterProperties (0).Value= 8
'PrinterProperties (1).Name="PaperSize"
'PrinterProperties (1).Value= PaperSize
'xray Doc.getPrinter

Dim PrinterProps(1) As New
PrinterProps(1).Name = "IsBusy"

dim bIsBusy as boolean
bIsBusy = True
While bIsBusy
'dim aPrintConditions as object
aPrintConditions = thiscomponent.getPrinter()
dim i as integer
For i = LBound( aPrintConditions ) To UBound( aPrintConditions )
If aPrintConditions(i).Name = "IsBusy" Then
bIsBusy = aPrintConditions(i).Value
Wait 10


end sub

Sub DisplayPrinterProperties
Dim Props 'Array of
Dim i% 'Index variable of type Integer
Dim s$ 'Display string
Dim v '
Dim sName$ '
On Error Resume Next
Props = ThisComponent.getPrinter()
For i = 0 To UBound(Props)
sName = props(i).Name
v = props(i).Value
s = s & sName & " = "
If sName = "PaperOrientation" Then
REM also supported
s = s & IIf(,_
"Portrait", "Landscape") & " = " & CStr(v)
ElseIf sName = "PaperFormat" Then
Select Case v
s = s & "A3"
s = s & "A4"
s = s & "A5"
s = s & "B4"
s = s & "B5"
s = s & "LETTER"
s = s & "LEGAL"
s = s & "TABLOID"
s = s & "USER"
Case Else
s = s & "Unknown value"
End Select
s = s & " = " & CStr(v)
ElseIf sName = "PaperSize" Then
REM type is
REM The size is in TWIPS and there are 1440 twips per inch
s=s & CDbl(v.Width)/1000 & "x" & CDbl(v.Height)/1000 & " (cm)"
s = s & CStr(v)
End If
s = s & CHR$(10)
s= "Sometimes the PrinterName is correct but never the wanted
of 20x20 cm " &CHR(10) & s
MsgBox s, 0, "Printer Properties"

End Sub

Unsubscribe instructions: E-mail to
*** All posts to this list are publicly archived for eternity ***


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.