Translation

sf_writer.xhp par_id501623063693649 help.text
English 3uC2J
Context English Bengali (India) Actions
sf_writer.xhp
hd_id581582885621841
help.text
Service invocation
sf_writer.xhp
par_id141609955500101
help.text
Before using the <literal>Writer</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:
sf_writer.xhp
par_id591589191059889
help.text
The <literal>Writer</literal> service is closely related to the <literal>UI</literal> service of the <literal>ScriptForge</literal> library. Below are a few examples of how the <literal>Writer</literal> service can be invoked.
sf_writer.xhp
par_id551621623999947
help.text
The code snippet below creates a <literal>Writer</literal> service instance that corresponds to the currently active Writer document.
sf_writer.xhp
par_id341621467500466
help.text
Another way to create an instance of the <literal>Writer</literal> service is using the <literal>UI</literal> service. In the following example, a new Writer document is created and <literal>oDoc</literal> is a <literal>Writer</literal> service instance:
sf_writer.xhp
par_id921621467621019
help.text
Or using the <literal>OpenDocument</literal> method from the <literal>UI</literal> service:
sf_writer.xhp
par_id741621467697967
help.text
It is also possible to instantiate the <literal>Writer</literal> service using the <literal>CreateScriptService</literal> method:
sf_writer.xhp
par_id271621467810774
help.text
In the example above, "MyFile.odt" is the name of an open document window. If this argument is not provided, the active window is considered.
sf_writer.xhp
par_id71158288562139
help.text
It is recommended to free resources after use:
sf_writer.xhp
par_id231611610666018
help.text
However, if the document was closed using the <literal>CloseDocument</literal> method, it becomes unnecessary to free resources using the command described above.
sf_writer.xhp
par_id71611090922315
help.text
The use of the prefix "<literal>SFDocuments.</literal>" while calling the service is optional.
sf_writer.xhp
hd_id291631196803182
help.text
Definitions
sf_writer.xhp
hd_id351582885195476
help.text
Properties
sf_writer.xhp
hd_id501582887473754
help.text
Methods
sf_writer.xhp
par_id891611613601554
help.text
List of Methods in the Writer Service
sf_writer.xhp
par_id501623063693649
help.text
Depending on the parameters provided this method will return:
sf_writer.xhp
par_id611623063742045
help.text
A zero-based Array (or a tuple in Python) with the names of all the forms contained in the document (if the <literal>form</literal> argument is absent)
sf_writer.xhp
par_id641623063744536
help.text
A <literal>SFDocuments.Form</literal> service instance representing the form specified as argument.
sf_writer.xhp
par_id821623076570573
help.text
This method is applicable only for Writer documents. Calc and Base documents have their own <literal>Forms</literal> method in the <link href="text/sbasic/shared/03/sf_calc.xhp#Forms" name="Calc_Forms">Calc</link> and <link href="text/sbasic/shared/03/sf_base.xhp#Forms" name="Base_Forms">Base</link> services, respectively.
sf_writer.xhp
par_id451623063459286
help.text
<emph>form</emph>: The name or index corresponding to a form stored in the document. If this argument is absent, the method will return a list with the names of all forms available in the document.
sf_writer.xhp
par_id251623063305557
help.text
In the following examples, the first line gets the names of all forms in the document and the second line retrieves the <literal>Form</literal> object of the form named "Form_A".
sf_writer.xhp
par_id31592919577984
help.text
Send the contents of the document to the printer. The printer may be previously defined by default, by the user or by the <link href="text/sbasic/03/sf_document.xhp#SetPrinter" name="SetPrinter method"><literal>SetPrinter</literal></link> method of the <link href="text/sbasic/03/sf_document.xhp" name="Document service">Document</link> service. Returns <literal>True</literal> when successful.
sf_writer.xhp
par_id441592919577809
help.text
<emph>pages</emph>: The pages to print as a string, like in the user interface. Example: "1-4;10;15-18". Default = all pages
sf_writer.xhp
par_id221636020923278
help.text
<emph>copies</emph>: The number of copies, default is 1.
sf_writer.xhp
par_id121636020926764
help.text
<emph>printbackground</emph>: Prints the background image when <literal>True</literal> (default).
sf_writer.xhp
par_id261636020927276
help.text
<emph>printblankpages</emph>: When <literal>False</literal> (default), omits empty pages.
sf_writer.xhp
par_id021636020927484
help.text
<emph>printevenpages</emph>: Prints even pages when <literal>True</literal> (default).
sf_writer.xhp
par_id391636020927676
help.text
<emph>printoddpages</emph>: Print odd pages when <literal>True</literal> (default).
sf_writer.xhp
par_id121636021103996
help.text
<emph>printimages</emph>: Print graphic objects when <literal>True</literal> (default).
Component Translation Difference to current string
This translation Propagated Empty LibreOffice Help - master/text/sbasic/shared/03
The following strings have different contexts, but the same source.
Empty LibreOffice Help - master/text/sbasic/shared/03
Empty LibreOffice Help - master/text/sbasic/shared/03

Loading…

No matching activity found.
Browse all component changes

Glossary

English Bengali (India)
No related strings found in the glossary.

String information

Context
sf_writer.xhp
par_id501623063693649
help.text
Source string description
3uC2J
Source string location
sf_writer.xhp
String age
a year ago
Source string age
a year ago
Translation file
bn-IN/helpcontent2/source/text/sbasic/shared/03.po, string 3388