Skip to main content
Participating Frequently
November 14, 2008
Question

How to add to InDesign Book new book(chapter) from IDFile

  • November 14, 2008
  • 4 replies
  • 977 views
I'm glad to have some recommendation, that's my code but I can't find the way how to add books, even through K2Vector<IDFile><br /><br />IDFile bookPath(PMString("D:\\Book1.indb"));<br /> IDataBase* db= pTargetList->GetDataBase();<br /> InterfacePtr<IBookManager> iBook(gSession,UseDefaultIID());<br /> IBook *myBook = iBook->CreateBook(bookPath,IDataBase::kNoProtection ,nil);<br /> InterfacePtr<IBookContentMgr> cntMan(myBook,UseDefaultIID());<br /><br />K2Vector <IDFile> fileList; <br />and what next ?
This topic has been closed for replies.

4 replies

Lion_J
Inspiring
March 2, 2009
I solved this problem.

I'm very sorry, this is my fault.

That is not closed document.

Thank you everyone.
Participant
November 16, 2009

how did you guys solve it?

i'm trying hard to find out how to create a book and then add documents to it... can you asist with a sample?

Lion_J
Inspiring
February 28, 2009
Dear Mikle lgnatovich

I looking for how to build book for a long time.

I create book and add document.
but I can't close the book.

whenever I close the book, indesign crashed.

Could you let me know how to close the book?

Thank you.
Participating Frequently
November 21, 2008
Thanks, I've done everything (:
Participating Frequently
November 14, 2008
InterfacePtr<ICommand> copyCmd(CmdUtils::CreateCommand(kAddDocToBookCmdBoss));<br /> InterfacePtr<IBookContentCmdData> bookCmd(copyCmd,UseDefaultIID());<br /> bookCmd->SetTargetBook(bookPath);<br /> <br /> K2Vector <IDFile> fileList; <br />bookCmd->SetContentFile(fileList);<br /><br />I used that but in result the book was empty. But the fileList was filled. <br />I can't uderstand what wrong