c# pdf reader writer : Delete pages from pdf in reader control SDK platform web page winforms wpf web browser TeXbyTopic5-part935

Chapter3. Characters
\catcode 4-bitnumber(0–15);thecategorytowhichacharacterbelongs.Thisistrea-
tedinChapter2.
\mathcode 15-bitnumber(0–"7FFF)or"8000;determineshowacharacteristreated
inmathmode.SeeChapter21.
\delcode 27-bitnumber(0–"7FFFFFF); determineshowacharacteristreatedafter
\leftor\rightinmathmode.Seepage192.
\sfcode integer;determineshowspacingisaffectedafterthischaracter.SeeChapter20.
\lccode,\uccode 8-bitnumber(0-255);lowercaseanduppercasecodes–thesewere
treatedabove.
3.8
Convertingtokensintocharacterstrings
Thecommand\stringtakesthenexttokenandexpandsitintoastringofseparatecha-
racters.Thus
\tt\string\control
willgive\controlintheoutput,and
\tt\string$
willgive$,but,notingthatthestringoperationcomesafterthetokenizing,
\tt\string%
willnotgive%,becausethecommentsignisremovedbyT
E
X’sinputprocessor.Therefore,
thiscommandwill‘string’thefirsttokenonthenextline.
The\stringcommandisexecutedbytheexpansionprocessor,thusitisexpandedunless
explicitlyinhibited(seeChapter12).
3.8.1
Outputofcontrolsequences
In theaboveexamplesthetypewriter font wasselected,becausetheComputerModern
roman fontdoes not haveabackslash character.However,T
E
Xneednothaveusedthe
backslashcharactertodisplayacontrolsequence:itusescharacternumber\escapechar.
Thissamevalueisalsousedwhenacontrolsequenceisoutputwith\write,\message,
or\errmessage, and it is used in the output of \show,\showtheand \meaning. If
\escapecharisnegativeormorethan255,theescapecharacterisnotoutput;thedefault
value(setinIniT
E
X)is92,thenumberofthebackslashcharacter.
Forusein a\writestatementthe\stringcaninsomecircumstancesbereplacedby
\noexpand(seepage134).
3.8.2
Categorycodesofa\string
Thecharactersthataretheresultofa\stringcommandhavecategorycode12,except
forany spacesinastringedcontrol sequence; theyhavecategorycode10.Sinceinside
acontrol sequencetherearenocategory codes,any spacesresultingfrom\stringare
ofnecessityonlyspacecharacters,thatis,characterswithcode32.However,T
E
X’sinput
50
VictorEijkhout–T
E
XbyTopic
Delete pages from pdf in reader - remove PDF pages in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provides Users with Mature Document Manipulating Function for Deleting PDF Pages
delete pages pdf document; delete page pdf file reader
Delete pages from pdf in reader - VB.NET PDF Page Delete Library: remove PDF pages in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Visual Basic Sample Codes to Delete PDF Document Page in .NET
delete a page in a pdf file; delete pages from pdf document
3.8. Convertingtokensintocharacterstrings
processorconvertsallspacetokensthathaveacharactercodeotherthan32intocharacter
tokenswithcharactercode32,sothechancesareprettyslimthat‘funnyspaces’windup
incontrolsequences.
Othercommandswiththesamebehaviourwithrespecttocategorycodesas\string,are
\number,\romannumeral,\jobname,\fontname,\meaning,and\the.
VictorEijkhout–T
E
XbyTopic
51
C# PDF File & Page Process Library SDK for C#.net, ASP.NET, MVC
VB.NET Page: Insert PDF pages; VB.NET Page: Delete PDF pages; VB.NET Annotate: PDF Markup & Drawing. XDoc.Word for XImage.OCR for C#; XImage.Barcode Reader for C#
delete pages in pdf online; add and delete pages in pdf
C# PDF Page Insert Library: insert pages into PDF file in C#.net
how to merge PDF document files by C# code, how to rotate PDF document page, how to delete PDF page using C# .NET, how to reorganize PDF document pages and how
delete pages from pdf file online; delete pdf pages in preview
Chapter 4
Fonts
IntextmodeT
E
Xtakescharactersfroma‘currentfont’.Thischapterdescribeshowfonts
areidentifiedtoT
E
X,andwhatattributesafontcanhave.
\font Declaretheidentifyingcontrolsequenceofafont.
\fontname Theexternalnameofafont.
\nullfont NameofanemptyfontthatT
E
Xusesinemergencies.
\hyphenchar Numberofthehyphencharacterofafont.
\defaulthyphenchar Valueof\hyphencharwhenafontisloaded.PlainT
E
Xdefault:‘\-.
\fontdimen Accessvariousparametersoffonts.
\char47 Italiccorrection.
\noboundary Omitimplicitboundarycharacter.
4.1
Fonts
InT
E
Xterminologyafontisthesetofcharactersthatiscontainedinoneexternalfontfile.
Duringprocessing,T
E
Xdecidesfromwhatfontacharactershouldbetaken.Thisdecision
istakenseparatelyfortextmodeandmathmode.
WhenT
E
Xisprocessingordinarytext,charactersaretakenfromthe‘currentfont’.External
fontfilenamesarecoupledtocontrolsequencesbystatementssuchas
\font\MyFont=myfont10
whichmakesT
E
Xloadthefilemyfont10.tfm.Switchingthecurrentfonttothefontdes-
cribedinthatfileisthendoneby
\MyFont
Thestatusofthecurrentfontcanbequeried:thesequence
\the\font
producesthecontrolsequenceforthecurrentfont.
Math modecompletely ignoresthecurrentfont.Insteaditlooksat the‘currentfamily’,
whichcancontainthreefonts:onefortextstyle,oneforscriptstyle,andoneforscriptscript
style.ThisistreatedinChapter21.
52
VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
Page: Insert PDF Pages. |. Home ›› XDoc.PDF ›› VB.NET PDF: Insert PDF Page. Add and Insert Multiple PDF Pages to PDF Document Using VB.
delete pages out of a pdf; cut pages out of pdf online
VB.NET PDF delete text library: delete, remove text from PDF file
Visual Studio .NET application. Delete text from PDF file in preview without adobe PDF reader component installed. Able to pull text
delete pages pdf preview; delete blank page in pdf
4.2. Fontdeclaration
See[42]foraconsistentterminologyoffontsandtypefaces.
With‘virtualfonts’(see[24])itispossiblethatwhatlookslikeonefonttoT
E
Xresidesin
morethanonephysicalfontfile.Seefurtherpage263.
4.2
Fontdeclaration
Somewhereduringarun ofT
E
XorIniT
E
Xthecoupling betweenan internal identifying
control sequenceandtheexternalfilenameofafont hastobemade.Thesyntaxofthe
commandforthisis
\fontcontrolsequenceequalsfilenameatclause
where
atclause−→atdimen|scalednumber|optionalspaces
Fontdeclarationsarelocaltoagroup.
By theatclausetheuserspecifiesthat somemagnifiedversion ofthefont iswanted.
Theatclausecomesintwoforms:ifthefontisgivenscaledf T
E
Xmultipliesall its
font dimensions forthat font by f/1000; ifthefont hasadesign sizedptand theat
clauseisatpptT
E
Xmultipliesallfontdatabyp/d.Thepresenceofanatclausemakes
nodifferencefortheexternalfontfile(the.tfmfile)that T
E
Xreadsforthefont;itjust
multipliesthefontdimensionsbyaconstant.
Aftersuchafontdeclaration,usingthedefinedcontrolsequencewillsetthecurrentfontto
thefontofthecontrolsequence.
4.2.1
Fontsandtfmfiles
Theexternalfileneededforthefontisatfm(T
E
Xfontmetrics)file,whichistakeninde-
pendentofanyatclauseinthe\fontdeclaration.Ifthetfmfilehasbeenloadedalready
(forinstancebyIniT
E
Xwhenitconstructedtheformat),anassignmentofthatfontfilecan
bereexecutedwithoutneedingrecoursetothetfmfile.
Fontdesignsizesaregiven inthefontmetricsfiles.Thecmr10font,forinstance,hasa
designsizeof10point.However,thereisnotmuchinthefontthatactuallyhasasizeof
10 points:theopeningand closingparenthesesaretwoexamples,but capital lettersare
considerablysmaller.
4.2.2
Queryingthecurrentfontandfontnames
Itwasalreadymentionedabovethatthecontrolsequencewhichsetthecurrentfontcanbe
retrievedbythecommand\the\font.Thisisaspecialcaseof
\thefont
where
font−→\font|fontdeftoken|familymember
familymember−→fontrange4-bitnumber
fontrange−→\textfont|\scriptfont|\scriptscriptfont
VictorEijkhout–T
E
XbyTopic
53
C# PDF Page Rotate Library: rotate PDF page permanently in C#.net
batch changing PDF page orientation without other PDF reader control. NET, add new PDF page, delete certain PDF page, reorder existing PDF pages and split
delete page pdf; delete page from pdf file online
C# PDF delete text Library: delete, remove text from PDF file in
Delete text from PDF file in preview without adobe PDF reader component installed in ASP.NET. C#.NET PDF: Delete Text from Consecutive PDF Pages.
delete page in pdf file; delete pages from a pdf document
Chapter4. Fonts
Afontdeftokenisacontrolsequencedefinedby\font,orthepredefinedcontrolse-
quence\nullfont.Theconceptoffamilymemberisonlyrelevantinmathmode.
Also,theexternalnameoffontscanberetrieved:
\fontnamefont
givesasequenceofcharactertokensofcategory12(butspacecharactersgetcategory10)
thatspellsthefontfilename,plusanatclauseifapplicable.
After
\font\tenroman=cmr10 \tenroman
thecalls\the\fontand\the\tenromanboth give\tenroman.The
call\fontname\tenromangivescmr10.
4.2.3
\nullfont
T
E
Xalwaysknowsafontthathasnocharacters:the\nullfont.Ifnofonthasbeenspe-
cified,orifinmathmodeafamilymemberisneededthathasnotbeenspecified,T
E
Xwill
takeitscharactersfromthenullfont.Thiscontrolsequencequalifiesasafontdeftoken:it
actslikeanyothercontrolsequencethatstandsforafont;itjustdoesnothaveanassociated
tfmfile.
4.3
Fontinformation
DuringarunofT
E
Xthemaininformationneededaboutthefontconsistsofthedimensions
ofthecharacters.T
E
Xfindstheseinthefontmetricsfiles,whichusuallyhaveextension
.tfm.Suchfilescontain
globalinformation:the\fontdimenparameters,andsomeotherinformation,
dimensionsandtheitaliccorrectionsofcharacters,and
ligatureandkerningprogramsforcharacters.
Also,thedesignsizeofafontisspecifiedinthetfmfile;seeabove.Thedefinitionofthe
tfmformatcanbefoundin[23].
4.3.1
Fontdimensions
Textfontsneedtohaveatleastseven\fontdimenparameters(butT
E
Xwilltakezerofor
unspecifiedparameters);mathsymbolandmathextensionfontshavemore(seepage208).
Fortextfontstheminimalsetofsevencomprisesthefollowing:
1.
theslantperpoint;thisdimensionisusedfortheproperhorizontalpositioningof
accents;
2.
theinterwordspace:thisisusedunlesstheuserspecifiesanexplicit\spaceskip;
seeChapter20;
3.
interwordstretch:thestretchcomponentoftheinterwordspace;
4.
interwordshrink:theshrinkcomponentoftheinterwordspace;
5.
thex-height:thevalueoftheinternalunitex,whichisusuallyabouttheheight
ofthelowercaseletter‘x’;
54
VictorEijkhout–T
E
XbyTopic
VB.NET PDF Page Extract Library: copy, paste, cut PDF pages in vb.
C:\test1.pdf") Dim pdf2 As PDFDocument = New PDFDocument("C:\test2.pdf") Dim pageindexes = New Integer() {1, 2, 4} Dim pages = pdf.DuplicatePage(pageindexes
delete page numbers in pdf; copy pages from pdf to new pdf
C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net
C#.NET PDF Library - Copy and Paste PDF Pages in C#.NET. Easy to C#.NET Sample Code: Copy and Paste PDF Pages Using C#.NET. C# programming
delete page pdf file; copy page from pdf
4.3. Fontinformation
6.
thequad width:thevalueoftheinternal unitem,which isapproximately the
widthofthecapitalletter‘M’;and
7.
theextraspace: thespaceaddedtotheinterwordspaceat theendofsentences
(thatis,when\spacefactor≥2000)unlesstheuserspecifiesanexplicit\x-
spaceskip.
Parameters1and5 arepurelyinformationabout thefont and thereisnopointinvary-
ingthem.Thevaluesofotherparameterscanbechangedinordertoadjust spacing;see
Chapter20forexamplesofchangingparameters2,3,4,and7.
Fontdimensionscanbealteredinafontassignment,whichisaglobalassignment(see
page106):
\fontdimennumberfontequalsdimen
Seeaboveforthedefinitionoffont.
4.3.2
Kerning
Somecombinationsofcharactersshouldbemovedclosertogetherthanwouldbethecase
iftheirboundingboxesweretobejustabutted.Thisfinespacingiscalledkerning,anda
properkerningisasessentialtoafontasthedesignofthelettershapes.
Considerasanexample
‘Vo’versustheunkernedvariant‘Vo’
KerninginT
E
Xiscontrolledbyinformationinthetfmfile,andisthereforeoutsidethe
influenceoftheuser.Thetfmfilecanbeedited,however(seeChapter33).
The\kerncommandhas(almost)nothingtodowiththephenomenon ofkerning;itis
explainedinChapter8.
4.3.3
Italiccorrection
Theprimitivecontrol symbol \/insertsthe‘italiccorrection’ofthepreviouscharacter
orligature.Suchacorrectionmaybenecessaryowingtothedefinitionofthe‘bounding
box’ofacharacter.Thisboxalwayshasverticalsides,andthewidthofthecharacterasT
E
X
perceivesitisthedistancebetweenthesesides.However,inordertoachieveproperspacing
forslanted oritalictypefaces, characters may very well project outsidetheir bounding
boxes.Theitaliccorrectionisthenneededifsuchanoverhangingcharacterisfollowedby
acharacterfromanon-slantingtypeface.
Compareforinstance
‘T
E
Xhas’to‘T
E
Xhas’,
wherethesecondversionwastypedas
{\italic\TeX\/} has
Thesizeoftheitaliccorrectionofeachcharacterisdeterminedbyfontinformationinthe
fontmetricsfile;fortheComputerModernfontsitisapproximatelyhalfthe‘overhang’of
thecharacters;see[17].Italiccorrectionisnotthesameas\fontdimen1,slantperpoint.
Thatfontdimensionisusedonlyforpositioningaccentsontopofcharacters.
VictorEijkhout–T
E
XbyTopic
55
Chapter4. Fonts
Anitaliccorrection can only beinserted iftheprevious itemprocessed by T
E
Xwas a
characterorligature.Thusthefollowingsolution forromantextinsideanitalicpassage
doesnotwork:
{\italic Some text {\/\roman not} emphasized}
Theitaliccorrectionhasnoeffecthere,becausethepreviousitemisglue.
4.3.4
Ligatures
Replacementofcharactersequencesbyligaturesiscontrolledbyinformationinthetfm
fileofafont.Ligaturesareformedfromcharactercommands:sequencessuchasfiare
replacedby‘fi’insomefonts.
Otherligaturestraditionallyinusearebetweenff,ffi,fl,andffl;insomeolderworks
ftandstcanbefound,andsimilarlytotheflligaturefkandfbcanalsooccur.
LigaturesinT
E
Xcanbeformedbetweenexplicitcharactertokens,\charcommands,and
chardeftokens.Forexample,thesequence\char‘f\char‘iisreplacedbythe‘fi’liga-
ture,ifsuchaligatureispartofthefont.
Unwantedligaturescanbesuppressedinanumberofways:theunwantedligature‘halflife’
canforinstancebepreventedby
half{}life,half{l}ife,half\/life,orhalf\hbox{}life
butthesolutionusingitaliccorrectionisnotequivalenttotheothers.
4.3.5
Boundaryligatures
Eachwordissurroundedbyaleftandarightboundarycharacter(T
E
X3only).Thismakes
phenomenapossiblesuchasthetwodifferentsigmasinGreek:oneattheendofaword,
andoneforeveryotherposition.Thiscanberealizedthroughaligaturewiththeboundary
character.A\noboundarycommandimmediatelybeforeorafterawordsuppressesthe
boundarycharacteratthatplace.
In general,theligaturemechanism hasbecomemorecomplicated withthetransitionto
T
E
Xversion3;see[20].
56
VictorEijkhout–T
E
XbyTopic
Chapter5
Boxes
ThehorizontalandverticalboxesofT
E
Xarecontainersforpiecesofhorizontalandvertical
lists.Boxescanbestoredinboxregisters.Thischaptertreatsboxregistersandsuchaspects
ofboxesastheirdimensions,and theway theircomponentsareplacedrelativeto each
other.
\hbox Constructahorizontalbox.
\vbox Constructaverticalboxwithreferencepointofthelastitem.
\vtop Constructaverticalboxwithreferencepointofthefirstitem.
\vcenter Constructaverticalboxverticallycentredonthemathaxis;thiscommandcan
onlybeusedinmathmode.
\vsplit Splitoffthetoppartofaverticalbox.
\box Useaboxregister,emptyingit.
\setbox Assignaboxtoaboxregister.
\copy Useaboxregister,butretainthecontents.
\ifhbox \ifvbox Testwhetheraboxregistercontainsahorizontal/verticalbox.
\ifvoid Testwhetheraboxregisterisempty.
\newbox Allocateanewboxregister.
\unhbox \unvbox Unpackaboxregistercontainingahorizontal/verticalbox,addingthe
contentstothecurrenthorizontal/verticallist,andemptyingtheregister.
\unhcopy \unvcopy Thesameas\unhbox/\unvbox,butdonotemptytheregister.
\ht \dp \wd Height/depth/widthoftheboxinaboxregister.
\boxmaxdepth Maximumalloweddepthofboxes.PlainT
E
Xdefault:\maxdimen.
\splitmaxdepth Maximumalloweddepthofboxesgeneratedby\vsplit.
\badness Badnessofthemostrecentlyconstructedbox.
\hfuzz \vfuzz Excesssizethat T
E
Xtoleratesbeforeitconsidersahorizontal/vertical
boxoverfull.
\hbadness \vbadness AmountoftolerancebeforeT
E
Xreportsanunderfulloroverfull
horizontal/verticalbox.
\overfullrule Widthoftherulethatisprintedtoindicateoverfullhorizontalboxes.
\hsize Linewidthusedfortexttypesettinginsideaverticalbox.
\vsize Heightofthepagebox.
\lastbox Registercontainingthelastitemaddedtothecurrentlist,ifthiswasabox.
\raise \lower Adjustverticalpositioningofaboxinhorizontalmode.
57
Chapter5. Boxes
\moveleft \moveright Adjusthorizontalpositioningofaboxinverticalmode.
\everyhbox \everyvbox Tokenlistinsertedatthestartofahorizontal/verticalbox.
5.1
Boxes
In thischapterweshalllook at boxes. Boxesarecontainersfor piecesof horizontalor
verticallists.Boxesthatareneededmorethanoncecanbestoredinboxregisters.
WhenT
E
Xexpectsabox,anyofthefollowingformsisadmissible:
\hboxboxspecification{horizontalmaterial}
\vboxboxspecification{verticalmaterial}
\vtopboxspecification{verticalmaterial}
\box8-bitnumber
\copy8-bitnumber
\vsplit8-bitnumbertodimen
\lastbox
Aboxspecificationisdefinedas
boxspecification−→filler
|todimenfiller|spreaddimenfiller
An8-bitnumberisanumberintherange0–255.
Thebraces surrounding box material defineagroup; they can beexplicitcharactersof
categories 1and 2respectively, or control sequences \let to suchcharacters; seealso
below.
Aboxcaningeneralbeusedinhorizontal,vertical,andmathmode,butseebelowfor
the\lastbox.TheconnectionbetweenboxesandmodesisexploredfurtherinChapter6.
Theboxproducedby\vcenter–acommandthatisallowedonlyinmathmode–isnota
box.Forinstance,itcannotbeassignedwith\setbox;seefurtherChapter23.
The\vsplitoperationistreatedinChapter27.
5.2
Boxregisters
Thereare256boxregisters,numbered0–255.Eitheraboxregisterisempty(‘void’),orit
containsahorizontalorverticalbox.Thissectiondiscussesspecificallyboxregisters;the
sizesofboxes,andthewaymaterialisarrangedinsidethem,istreatedbelow.
5.2.1
Allocation:\newbox
TheplainT
E
X\newboxmacroallocatesanunusedboxregister:
\newbox\MyBox
afterwhichonecansay
58
VictorEijkhout–T
E
XbyTopic
5.2. Boxregisters
\setbox\MyBox=...
or
\box\MyBox
andsoon.Subsequentcallstothismacrogivesubsequentboxnumbers;thiswaymacro
collectionscanallocatetheirownboxeswithoutfearofcollisionwithothermacros.
Thenumberoftheboxisassignedby\chardef(seeChapter31).Thisimpliesthat\MyBox
isequivalent to,and can beused as,anumber.Thecontrol sequence\newboxis an
\outermacro.Newlyallocatedboxregistersareinitiallyempty.
5.2.2
Usage:\setbox,\box,\copy
Aregisterisfilledbyassigningaboxtoit:
\setboxnumberequalsbox
Forexample,theboxcanbeexplicit
\setbox37=\hbox{...} or \setbox37=\vbox{...}
oritcanbeaboxregister:
\setbox37=\box38
Usually,boxnumberswillhavebeenassignedbya\newboxcommand.
Theboxinaboxregisterisappendedbythecommands\boxand\copytowhateverlist
T
E
Xisbuilding:thecall
\box38
appendsbox38.Tosavememoryspace,boxregistersbecomeemptybyusingthem:T
E
X
assumesthatafteryouhaveinsertedaboxbycalling\boxnninsomemode,youdonot
needthecontentsofthatregisteranymoreandemptiesit.Incaseyoudoneedthecontents
of abox register morethan once,youcan \copyit. Calling \copynnisequivalent to
\boxnninallrespectsexceptthattheregisterisnotcleared.
Itispossibletounwrapthecontentsofaboxregisterby‘unboxing’itusingthecommands
\unhboxand\unvbox,andtheircopyingversions\unhcopyand\unvcopy.Whereasa
boxcanbeusedinanymode,theunboxingoperationscanonlybeusedintheappropriate
mode,sinceineffecttheycontributeapartialhorizontalorverticallist(seealsoChapter6).
Seebelowformoreinformationonunboxingregisters.
5.2.3
Testing:\ifvoid,\ifhbox,\ifvbox
Boxregisterscanbetestedfortheircontents:
\ifvoidnumber
istrueiftheboxregisterisempty.Notethatanempty,or‘void’,boxregisterisnotthe
sameasaregistercontaininganemptybox.Anemptyboxisstilleitherahorizontalora
verticalbox;avoidregistercanbeusedasboth.
Thetest
\ifhboxnumber
VictorEijkhout–T
E
XbyTopic
59
Documents you may be interested
Documents you may be interested