Community
DWF
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DWF Toolkit Sample Program Issues

1 REPLY 1
Reply
Message 1 of 2
catkinson89
897 Views, 1 Reply

DWF Toolkit Sample Program Issues

Hello everyone,

I'm new to the DWF Toolkit, so I was taking a look through the sample projects, and lo and behold, the "Aggregate" sample project was EXACTLY what I was trying to do (I'm trying to automate merging of all DWFs in a subdirectory). I've found that the aggregate sample project works with most DWFs, but whenever I try to merge multiple files with paper spaces and model spaces, it breaks, sending a DWFXMLDuplicateAttributeException.

My question is, is it possible to merge multiple DWFs that have both paper and model spaces? All I need is the paper space. If it's possible, how would I go about doing it? My thanks to everyone who takes the time to respond to this message.

1 REPLY 1
Message 2 of 2
catkinson89
in reply to: catkinson89

An update: I've found that by deleting the model view from the DWF files, it merges the PAPER view into the output DWF just fine. Now I need to figure out how to either skip handling the model view, or create a temporary copy of the DWF and delete the model view from it before processing the file.

I also tried getting it to skip the first view (model view) in each file, to no avail, and similarly with the second view (just for testing's sake).

I figured I should include a code snippet from the Aggregate program. It errors out after attempting to execute " pSection->readDescriptor(); ".


DWFManifest::SectionIterator* piSections = rManifestIn.getSections();
if (piSections)
{
    DWFSection* pSection = NULL;
    
    for (; piSections->valid(); piSections->next())
    {
        pSection = piSections->get();
        pSection->readDescriptor();    //<-----THIS IS WHERE IT BREAKS

        //
        //  Add the section
        //
        oWriter.addSection( pSection );
    }
DWFCORE_FREE_OBJECT( piSections );
}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services