Esempio n. 1
0
        private void HPDF_NewDoc()
        {
            LibLogger.Debug(this.GetType(), "HPDF_NewDoc");

            HPDF_FreeDoc();
            Xref    = new HPDF_Xref();
            Trailer = Xref.Trailer;

            FontMgr = new HPDF_List(HPDF_Conf.HPDF_DEF_ITEMS_PER_BLOCK);

            if (FontdefList == null)
            {
                FontdefList = new HPDF_List(HPDF_Conf.HPDF_DEF_ITEMS_PER_BLOCK);
            }

            if (EncoderList == null)
            {
                EncoderList = new HPDF_List(HPDF_Conf.HPDF_DEF_ITEMS_PER_BLOCK);
            }

            Catalog = new HPDF_Catalog(Xref);

            RootPages = Catalog.HPDF_Catalog_GetRoot();

            //PageList = new HPDF_List(HPDF_Conf.HPDF_DEF_PAGE_LIST_NUM);

            //CurPages = RootPages;

            //var ptr = "CSharpPdf library ";
            //var version  = HPDF_GetVersion();

            //ptr += version;

            //HPDF_SetInfoAttr((int)HPDF_InfoType.HPDF_INFO_PRODUCER, ptr);
        }
Esempio n. 2
0
        public static HPDF_Annotation HPDF_LinkAnnot_New(HPDF_Xref xref, HPDF_Rect rect, HPDF_Destination dest)
        {
            LibLogger.Debug(MethodBase.GetCurrentMethod().DeclaringType, "HPDF_LinkAnnot_New");

            HPDF_Annotation annot = new HPDF_Annotation(xref, (uint)HPDF_AnnotType.HPDF_ANNOT_LINK, rect);

            annot.HPDF_Dict_Add("Dest", dest);

            return(annot);
        }
Esempio n. 3
0
        public HPDF_Catalog(HPDF_Xref xref)
        {
            LibLogger.Debug(this.GetType(), "HPDF_Catalog");

            Header.ObjClass |= HPDF_Obj_Header.HPDF_OSUBCLASS_CATALOG;

            xref.HPDF_Xref_Add(this);

            HPDF_Dict_AddName("Type", "Catalog");
            HPDF_Dict_Add("Pages", new HPDF_Pages(null, xref));
        }
Esempio n. 4
0
        public void HPDF_FreeDoc()
        {
            LibLogger.Debug(this.GetType(), "HPDF_FreeDoc");

            Error = new HPDF_Error();

            if (Xref != null)
            {
                Xref.HPDF_Xref_Free();
                Xref = null;
            }

            PdfVersion = (int)HPDF_PdfVer.HPDF_VER_13;
        }
Esempio n. 5
0
        public HPDF_Pages(HPDF_Pages parent, HPDF_Xref xref)
        {
            LibLogger.Debug(this.GetType(), "HPDF_Pages");

            Header.ObjClass |= HPDF_Obj_Header.HPDF_OSUBCLASS_PAGES;

            xref.HPDF_Xref_Add(this);

            HPDF_Dict_AddName("Type", "Pages");
            HPDF_Dict_Add("Kids", new HPDF_Array());
            HPDF_Dict_Add("Count", new HPDF_Number(0));

            if (parent != null)
            {
                parent.HPDF_Pages_AddKids(this);
            }
        }
Esempio n. 6
0
        public HPDF_Annotation HPDF_URILinkAnnot_New(HPDF_Xref xref, HPDF_Rect rect, string uri)
        {
            LibLogger.Debug(this.GetType(), "HPDF_URILinkAnnot_New");

            HPDF_Annotation annot;
            HPDF_Dict       action;

            annot = new HPDF_Annotation(xref, (uint)HPDF_AnnotType.HPDF_ANNOT_LINK, rect);

            /* create action dictionary */
            action = new HPDF_Dict();

            annot.HPDF_Dict_Add("A", action);

            action.HPDF_Dict_AddName("Type", "Action");
            action.HPDF_Dict_AddName("S", "URI");
            action.HPDF_Dict_Add("URI", new HPDF_String(uri, null));

            return(annot);
        }
Esempio n. 7
0
 // TODO body
 public HPDF_DictStream(HPDF_Xref xref)
 {
 }
Esempio n. 8
0
 public HPDF_Page(HPDF_Xref xref)
 {
     LibLogger.Debug(this.GetType(), "HPDF_Page");
 }
Esempio n. 9
0
 public HPDF_ExtGState(HPDF_Xref xref)
 {
     LibLogger.Debug(this.GetType(), "HPDF_GState");
 }
Esempio n. 10
0
 // TODO: body
 public void HPDF_TextAnnot_New(HPDF_Xref xref, HPDF_Rect rect, string text, HPDF_Encoder enecoder)
 {
     LibLogger.Debug(this.GetType(), "HPDF_TextAnnot_New");
 }
Esempio n. 11
0
 // TODO: body
 public HPDF_Annotation(HPDF_Xref xref, uint type, HPDF_Rect rect)
 {
     LibLogger.Debug(this.GetType(), "HPDF_Annotation");
 }
Esempio n. 12
0
 // TODO body
 public HPDF_Outline(bool root = false, HPDF_Outline parent = null, string title = "", HPDF_Encoder encoder = null, HPDF_Xref xref = null)
 {
     LibLogger.Debug(this.GetType(), "HPDF_Outline");
 }
Esempio n. 13
0
 public HPDF_EncryptDict(HPDF_Xref xref)
 {
     LibLogger.Debug(this.GetType(), "HPDF_EncryptDict");
 }
Esempio n. 14
0
 public void HPDF_EncryptDict_CreateID(HPDF_Dict info, HPDF_Xref xref)
 {
     LibLogger.Debug(this.GetType(), "HPDF_EncryptDict_CreateID");
 }
Esempio n. 15
0
 public HPDF_Destination(HPDF_Page target, HPDF_Xref xref)
 {
     LibLogger.Debug(this.GetType(), "HPDF_Destination");
 }