List Info

Thread: pdf_calc_Export for single sheet possible ?




pdf_calc_Export for single sheet possible ?
user name
2006-09-21 15:57:46
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

is there an easy way to export a single sheet
(which can contain 1-X print pages) to pdf ?

for example:

a calc document contains:

sheet1   1 page
sheet2   2 pages
sheet3   1 page

How to export "sheet2" ?

Do we have the same problem as http://qa.openoffice.org/issues/show_bug.cgi?id=10658
here ?

Oliver

- --

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C
AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFFErZ6TiyrQM/QSkURAkobAJ9q5N/5Tj1mn586xJFJe7DJA+c49QCe
NRB3
0GNh47dA/N997MFyZjCfcew=
=QMD5
-----END PGP SIGNATURE-----

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

pdf_calc_Export for single sheet possible ?
user name
2006-09-21 16:15:12
> is there an easy way to export a single sheet
> (which can contain 1-X print pages) to pdf ?

Yes.

> sheet1   1 page
> sheet2   2 pages
> sheet3   1 page
> 
> How to export "sheet2" ?

(1) File | Export to PDF...
(2) Give file name and destination
(3) Klick "Save"
(4) Choose Range|Selection

This will export the currently selected sheet(s) to PDF


Stefan

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

pdf_calc_Export for single sheet possible ?
user name
2006-09-21 16:48:42
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Stefan,

> (1) File | Export to PDF...
> (2) Give file name and destination
> (3) Klick "Save"
> (4) Choose Range|Selection

uups, i forgot to mention, that i was looking for a
starbasic script  ...

but this one seems not to work:

Sub PDFExport()

	On Local Error Goto ErrorHandler
	
	Dim oDocument as Object
	Dim exportPath as String
	Dim i as Integer
	Dim mArgs(4) as new com.sun.star.beans.PropertyValue

	exportPath = "E:\"	

	mArgs(0).Name = "FilterName"
	mArgs(0).Value = "calc_pdf_Export"

	mArgs(1).Name = "Overwrite"
	mArgs(1).Value = True

	mArgs(2).Name = "SelectionOnly"
	mArgs(2).Value = True

	oDocument = ThisComponent

	For i = 0 To oDocument.getSheets().getCount()-1
		oDocument.storeToURL(ConvertToURL(exportPath &
oDocument.getSheets().getByIndex(i).getName()) &
".pdf", mArgs())
	Next i
	
	Exit Sub

ErrorHandler:
	MsgBox("Fehler: " & Err() & Chr(13)
& "Zeile: " & Erl() & Chr(13) &
Error(), 1+16, "Fehler beim
Export")
		
End Sub


I am looking for something like:

mArgs(2).Name = "Sheets"
mArgs(2).Value = "1,2,5-7"

Oliver

- --

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C
AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFFEsJqTiyrQM/QSkURAuFmAJ0UrmNUnzGg2Qddt6WBYBbQXW+V7ACf
a638
qp21lWK+lZj7JX9e/eoJdLE=
=MyAw
-----END PGP SIGNATURE-----

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

pdf_calc_Export for single sheet possible ?
user name
2006-09-21 17:14:17
Oliver Brinzing wrote:
>> (1) File | Export to PDF...
>> (2) Give file name and destination
>> (3) Klick "Save"
>> (4) Choose Range|Selection
> 
> uups, i forgot to mention, that i was looking for a
starbasic script  ...

PDF export supports FilterData in the MediaDescriptor. It's
a sequence 
of PropertyValue, one supported entry is
"Selection", into which you can 
put a sheet object.

> I am looking for something like:
> 
> mArgs(2).Name = "Sheets"
> mArgs(2).Value = "1,2,5-7"

"Selection" only works with a single sheet (or
cell range). To export 
several sheets, you should set up print areas.

Niklas

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

pdf_calc_Export for single sheet possible ?
user name
2006-09-22 17:10:44
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Niklas,

thanks, that is what i was looking for 

> "Selection" only works with a single sheet
(or cell range). To export
> several sheets, you should set up print areas.

REM  *****  BASIC  *****

Sub PDFExport()

	On Local Error Goto ErrorHandler

	Dim oDocument as Object
	Dim oSheet as Object
	Dim exportPath as String
	Dim i as Integer
	Dim mArgs(4) as new com.sun.star.beans.PropertyValue
	Dim mFilterData(1) as new com.sun.star.beans.PropertyValue

	exportPath = "E:\"

	mArgs(0).Name = "FilterName"
	mArgs(0).Value = "calc_pdf_Export"

	mArgs(1).Name = "Overwrite"
	mArgs(1).Value = True

	oDocument = ThisComponent

	For i = 0 To oDocument.getSheets().getCount()-1
		oSheet = oDocument.getSheets().getByIndex(i)

		mFilterData(0).Name = "Selection"
		mFilterData(0).Value = oSheet

		mArgs(2).Name = "FilterData"
		mArgs(2).Value = mFilterData()

		oDocument.storeToURL(ConvertToURL(exportPath &
oSheet.getName()) & ".pdf", mArgs())
	Next i

	Exit Sub
ErrorHandler:
	MsgBox("Error: " & Err() & Chr(13)
& "Line: " & Erl() & Chr(13) &
Error(), 1+16, "Error...")
End Sub


Oliver
- --

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C
AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFFFBkUTiyrQM/QSkURAucnAKCo543RMWtATNaSHVMmB+NKrbkd4ACg
gCw+
U+TJymIF+3SOQEIhUEsRyi0=
=9SnV
-----END PGP SIGNATURE-----

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )