Wpviewpdf V4
Total Page:16
File Type:pdf, Size:1020Kb
WPViewPDF V3 WPViewPDF Version 4 Copyright (C) 2004-2016 WPCubed GmbH I WPViewPDF V4 Contents Foreword 0 Topic 1 Introduction 1 1 WPView..P...D..F.. .S..t.a..n..d..a..r.d.. ........................................................................................................... 4 2 WPView..P...D..F.. .P..L..U...S.. ................................................................................................................ 4 Topic 2 Installation 5 1 Delphi ................................................................................................................................... 5 2 C++ Bu.i.l.d..e.r.. ........................................................................................................................... 6 3 Visual S..t.u..d..i.o.. ......................................................................................................................... 6 4 VB6 ................................................................................................................................... 7 5 Distribu..t.i.o..n.. ........................................................................................................................... 8 Topic 3 Create a PDF Editor 9 1 Delphi E..x..a..m...p..l.e. ...................................................................................................................... 9 Add the ba..s..i.c.. .c.o..n..t.r..o..l.s. ...................................................................................................................................... 9 Initialize. .t.h..e.. .M..e..n..u.. .a..n..d.. .A...c.t.i.o..n..s.. ...................................................................................................................... 10 Add code.. .t.o.. .i.n..i.t.i.a..l.i.z..e.. .a.. .P..D..F.. .v..i.e..w...e..r. ............................................................................................................... 13 Create "O..n..C...l.i.c.k..".. ............................................................................................................................................ 14 Create "O..n..U...p..d..a..t.e..". ......................................................................................................................................... 17 Add all b.u..t.t.o..n..s.. .t.o.. .t.h..e.. .t.o..o..l. .b..a..r. ........................................................................................................................ 18 Add "For.m.....C..r.e..a..t.e..".. ......................................................................................................................................... 20 Localizat.i.o..n.. .................................................................................................................................................... 21 Modify A.n..n..o..t.a..t.i.o..n.. .p..r.o..p..e..r.t.i.e..s.. ......................................................................................................................... 22 2 .NET (.C..#..). .E...x.a..m...p..l.e.. .............................................................................................................. 23 Initialize. .P..r.o..g..r.a..m... ........................................................................................................................................... 24 Add the b..a..s..i.c. .c..o..n..t.r.o..l.s.. .................................................................................................................................... 25 Initialize. .t.h..e.. .v.i.e..w...e..r. ........................................................................................................................................ 25 Initialize. .t.h..e.. .m...e..n..u.. ......................................................................................................................................... 27 OnClick e..v..e..n..t. .h..a..n..d..l.e..r. .................................................................................................................................... 29 Initialize. .t.h..e.. .t.o..o..l.b..a..r. ....................................................................................................................................... 31 Update G..U..I. ..................................................................................................................................................... 33 Extract A.t.t.a..c..h..m...e..n..t.s. ........................................................................................................................................ 35 Topic 4 Tasks 36 1 Comm.a..n..d..(.). .-.. .e.x..e..c..u..t.e.. .p..r.o..c..e..d..u..r.e..s.. .o..f. .W...P..V...ie..w...P..D..F.. ............................................................... 36 2 Chang.e.. .G...U..I. ......................................................................................................................... 36 ViewCon.t.r.o..l.s.. .a..n..d.. .V..i.e..w...O..p..t.i.o..n..s.. ...................................................................................................................... 36 Localizat.i.o..n.. .................................................................................................................................................... 40 Create a .t.o..o..l.b..a..r.. ............................................................................................................................................. 41 Zooming. ......................................................................................................................................................... 42 3 Load a..n..d.. .S..a..v.e.. ..................................................................................................................... 44 4 Draw S...h..a.p..e..s.. ./. .T..e..x..t. .o..b..j.e.c..t.s.. .o..n.. .P..D...F.. .................................................................................... 45 Contents II Record T.P..D...F..D..r.a..w...O..b..j.e..c..t.R..e..c.. .......................................................................................................................... 48 Delete an..d.. .m...o..d..i.f.y.. .s.h..a..p..e..s.. .............................................................................................................................. 51 Render S..h..a..p..e..s. .i.n..t.o.. .P..D...F.. ................................................................................................................................ 52 XML Sup.p..o..r.t. ................................................................................................................................................... 53 VCL: Exa.m...p..l.e.. .-. .h..i.g..h..l.i.g..h..t. .r..e..c.t.a..n..g..l.e.. ................................................................................................................ 53 VCL: Exa.m...p..l.e..:. .T..e..x..t. .a..t. .m...o..u..s..e.. .p..o..s.i.t.i.o..n.. ........................................................................................................... 54 VCL: Add.. .t.e..x..t. .d..r.a..w... .o..b..j.e..c.t. .t.o.. .a..l.l. .p..a..g..e..s.. .......................................................................................................... 55 .NET C# E..x..a..m...p..l.e..:. .A..d..d.. .t.e..x..t.,. .i.m...a..g..e.. .o..r.. .r.e..c..t.a..n..g..l.e.. ............................................................................................ 56 VB6 add .r.e..c..t.a..n..g..l.e.. .a..n..d.. .t.e..x..t. ............................................................................................................................ 57 AddImag.e.. ....................................................................................................................................................... 57 AppendP.a..g..e.. .a..n..d.. .a..d..d.. .S...h..a..p..e.. ......................................................................................................................... 59 Render m..e..t.a..f.i.l.e..s.. .t.o.. .p..a..g..e..s. .............................................................................................................................. 60 5 Use st.a..m...p..i.n..g.. .s.c..r..ip..t.. .(.C..O...M..P...D..F.._..S..t.a..m...p..T..e..x.t..). ........................................................................ 61 Example.:. .A..d..d.. .P..a..g..e.. .n..u..m...b..e..r..s. ......................................................................................................................... 65 6 Printin..g.. ............................................................................................................................... 66 7 Page r.o..t..a.t..io..n.. ....................................................................................................................... 66 8 Page m...o..v..in..g.. ........................................................................................................................ 67 9 Troub.le.. .S..h..o..o..t..in..g.. ................................................................................................................. 68 10 Work .w..i.t.h.. .F..i.e..l.d..s.. .(.W...i.d..g..e..t.s..). ................................................................................................. 70 11 Messa.g..e..s.. ............................................................................................................................ 76 12 Conve.r..t. .P..D..F.. .i.n..t.o.. .w...a..t.e..r.m...a..r.k.. ..............................................................................................