hi Armin
can i modify the SDK to achieve my need.
achieve demo code as below:
Reference< XRenderable > xRenderable( mxSrcDoc, UNO_QUERY )
VCLXDevice* pXDevice = new VCLXDevice;
......
PDFWriter* pPDFWriter = new PDFWriter(
aURL.GetMainURL(INetURLObject::DECODE_TO_IURI), PDFWriter::PDF_1_4,
eCompressMode );
OutputDevice* pOut = pPDFWriter->GetReferenceDevice();
pXDevice->SetOutputDevice( pOut );
......
GDIMetaFile aMtf;
const MapMode aMapMode( MAP_100TH_MM );
const Size aMtfSize( aPageSize.Width, aPageSize.Height );
pOut->Push();
pOut->EnableOutput( FALSE );
pOut->SetMapMode( aMapMode );
aMtf.SetPrefSize( aMtfSize );
aMtf.SetPrefMapMode( aMapMode );
aMtf.Record( pOut );
xRenderable->render( nSel - 1, aSelection, aRenderOptions );
aMtf.Stop();
aMtf.WindStart();
if( aMtf.GetActionCount() )
bRet = ImplExportPage( *pPDFWriter, aMtf, nCompressMode ) || bRet;
pOut->Pop();
just provide the output of the VCL. To meet my needs.
If this idea can be.
How do I do?
Regards
On 06.06.2012 12:23, ???? wrote:
> hi Armin
>
> could you give me a example of use your Way doing a new
> exporter, assuming that the file format is pdf?
It would be more or less the same as every UNO API based export, iterate
over the document, the pages and the shapes. Instead of getting a
MetaFile from the shape (using Graphicxporter) you would get the
sequence of primitives and use that as base geometry information.
You cannot use this when you want to develop an extension, the UNO API
for primitives is minimal currently and thus you would have to link
against office components (what the definition of extension does not
allow). To do this, the most needed primitives would need to get an UNO
API implementation first.
> Regards
Sincerely,
Armin
--
ALG
</:includetail>