Hi,
I'd like to export an spreadsheet to JPEG.
Unfortunately only 7 of 17 columns are exported in the JPEG file.
I'd like to know if it's possible to remove the padding? The JPEG should
only contain the table without space at it's borders?
I guess that some PropertyValue's are missing ... but I can't figure out
which one.
The function for exporting the spreadsheet looks like this:
void
export_document_jpeg( Reference< XMultiServiceFactory > const&
xMainComponent, std::string const& documentFile) {
Reference< XStorable > xStore{ xMainComponent, UNO_QUERY };
Sequence< PropertyValue > filterParameters{ 3 };
filterParameters[0].Name = OUString::createFromAscii("PixelWidth");
filterParameters[0].Value <<= (sal_uInt32) (1654);
filterParameters[1].Name = OUString::createFromAscii("PixelHeight");
filterParameters[1].Value <<= (sal_uInt32) (2338);
filterParameters[2].Name = OUString::createFromAscii("Quality");
filterParameters[2].Value <<= (sal_uInt32) (100);
Sequence< PropertyValue > storeProps{ 3 };
storeProps[0].Name = OUString::createFromAscii("Overwrite");
storeProps[0].Value <<= (bool)(true);
storeProps[1].Name = OUString::createFromAscii("FilterName");
storeProps[1].Value <<= OUString::createFromAscii("writer_jpg_Export");
storeProps[2].Name = OUString::createFromAscii("FilterData");
storeProps[2].Value <<= filterParameters;
xStore->storeToURL( OUString::createFromAscii( documentFile.c_str() ),
storeProps);
}
Thank you in advance.
Oliver
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
- [libreoffice-users] spreadsheet as JPEG: not all columns exported · Oliver Kowalke
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.