Ejemplo n.º 1
0
        static public int InsertEmptyPagesIntoDoc(Form1 Parent)
        {
            if (Parent.m_CurDoc == null)
            {
                Document.OpenDocFromStringPath(Parent);
            }
            IPXC_Pages        pages     = Parent.m_CurDoc.Pages;
            IPXC_Page         firstPage = pages[0];
            PXC_Rect          rcMedia   = firstPage.get_Box(PXC_BoxType.PBox_MediaBox);
            IPXC_UndoRedoData urd       = null;

            //Adding page with the size of the first page of the current document
            pages.AddEmptyPages(0, 1, ref rcMedia, null, out urd);
            Marshal.ReleaseComObject(firstPage);
            Marshal.ReleaseComObject(pages);
            return((int)Form1.eFormUpdateFlags.efuf_All);
        }
Ejemplo n.º 2
0
        static public int CreateNewDoc(Form1 Parent)
        {
            IPXC_Document coreDoc = Parent.m_pxcInst.NewDocument();
            PXC_Rect      rc;

            rc.left   = 0;
            rc.right  = 600;
            rc.top    = 800;
            rc.bottom = 0;
            IPXC_UndoRedoData urd;
            IPXC_Pages        pages = coreDoc.Pages;

            pages.AddEmptyPages(0, 1, ref rc, null, out urd);
            Parent.CloseDocument();
            Parent.m_CurDoc = coreDoc;
            Marshal.ReleaseComObject(pages);
            return((int)Form1.eFormUpdateFlags.efuf_All);
        }