I've been using the SavePageRectAsAnImage method from this post https://forum.pdf-xchange.com/viewtopic.php?f=66&t=30710&p=122842&hilit=Page_CreateEmpty#p122842.
As a result: I can save a page as an image - works as expected.
Now, what I really need is to place an image as a content into a pxc page.
Here's some pseudo code:
Code: Select all
//cDoc is a Core Document having 1 page
cDoc.Pages.Get_Item(0, page);
page.Get_Box(PBox_MediaBox, stMediaBox);
... here comes the part with saving this page as an image, that is xcPage = DrawToIXCPage(...) ...
//now trying to place that image of the first page onto a new page
pImage := cDoc.AddImageFromIXCPage(xcPage, 0);
cDoc.Pages.AddEmptyPages(1, 1, stMediaBox, nil, pUndoData);
cDoc.Pages.Get_Item(1, newPage);
cc := cDoc.CreateContentCreator;
cc.PlaceImage(pImage);
cc.Detach(pContent);
newPage.PlaceContent(pContent, PlaceContent_After);
cDoc.WriteToFile(...);
What am I missing ?
p.s.
Hresults are all "ok"
-žarko