c# pdf reader writer : Delete page from pdf reader SDK Library service wpf asp.net web page dnn TeXbyTopic10-part911

Chapter9. RulesandLeaders
\hbox{\vrule width1pt\ Important text! \vrule width 1pt}
whichgives
Importanttext!
However,onemightwanttohaveahorizontalruleinhorizontalmodeforeffectssuchas
←−
5cm
−→
fromhere
tothere
An\hrulecannotbeusedinhorizontalmode,andaverticalrulewillnotspreadautoma-
tically.
However,thereisawaytousean\hrulecommandinhorizontalmodeanda\vrulein
verticalmode,andthatiswith‘leaders’,socalledbecausetheyleadyoureyeacrossthe
page.AleadercommandtellsT
E
Xtofillaspecifiedspace,inwhatevermodeitisin,with
asmanycopiesofsomeboxorrulespecificationasareneeded.Forinstance,theabove
examplewasgivenas
\hbox to 5cm{from here\leaders\hrule\hfil to there}
thatis,withan\hrulethatwasallowedtostretchalongan\hfil.Notethattheleader
wasgivenahorizontalskip,correspondingtothehorizontalmodeinwhichitappeared.
Ageneralleadercommandlookslike
leadersboxorrulevertical/horizontal/mathematicalskip
where leadersis \leaders,\cleaders, or \xleaders, a box or rule isa box,
\vrule,or\hrule, and the listsofhorizontal and verticalskipsappearin Chapter6;
amathematicalskipiseitherahorizontalskiporan\mskip(seepage205).Leaderscan
thusbeusedinallthreemodes.Ofcourse,theappropriatekindofskipmustbespecified.
Ahorizontal(vertical)boxcontainingleadershasatleasttheheightanddepth(width)of
theboxorruleusedintheleaders,evenif,ascanhappeninthecaseofboxleaders,no
actualleadersareplaced.
9.2.1
Ruleleaders
Ruleleadersfillthespecifiedamountofspacewitharuleextendinginthedirectionofthe
skipspecified.Theotherdimensionsoftheresultingruleleaderaredeterminedbythesort
ofrulethatisused:eitherdimensionscanbespecifiedexplicitly,orthedefaultvaluescan
beused.
Forinstance,
\hbox{g\leaders\hrule\hskip20pt f}
gives
g
f
becauseahorizontalrulehasadefaultheightof.4pt.Ontheotherhand,
\hbox{g\leaders\vrule\hskip20pt f}
gives
g
f
100
VictorEijkhout–T
E
XbyTopic
Delete page from pdf 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 pdf pages reader; delete page from pdf document
Delete page from pdf 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
copy page from pdf; delete a page from a pdf in preview
9.2. Leaders
becausetheheightanddepthofaverticalrulebydefaultfillthesurroundingbox.
Spuriousruledimensionsareignored:inhorizontalmode
\leaders\hrule width 10pt \hskip 20pt
isequivalentto
\leaders\hrule \hskip 20pt
Ifthewidthorheight-plus-depthofeithertheskiportheboxisnegative,T
E
Xusesordinary
glueinsteadofleaders.
9.2.2
Boxleaders
Boxleadersfilltheavailablespaceswithcopiesofagivenbox,insteadofwitharule.
Forallofthefollowingexamples,assumethataboxregisterhasbeenallocated:
\newbox\centerdot \setbox\centerdot=\hbox{\hskip.7em.\hskip.7em}
Nowtheoutputof
\hbox to 8cm {here\leaders\copy\centerdot\hfil there}
is
here
. . . . . . . . . .
there
Thatis,copiesoftheboxregisterfilluptheavailablespace.
Dotleaders,asintheaboveexample,areoftenusedfortablesofcontents.Insuchappli-
cationsitisdesirablethatdotsonsubsequentlinesareverticallyaligned.The\leaders
commanddoesthisautomatically:
\hbox to 8cm {here\leaders\copy\centerdot\hfil there}
\hbox to 8cm {over here\leaders\copy\centerdot\hfil over there}
gives
here
. . . . . . . . . .
there
overhere
. . . . . . . . overthere
Themechanismbehindthisisthefollowing:T
E
Xactsasifaninfiniterowofboxesstarts
(invisibly)attheleftedgeofthesurroundingbox,andtherowofcopiesactuallyplacedis
merelythepartofthisrowthatisnotobscuredbytheothercontentsofthebox.
Stateddifferently,boxleadersareawindowonaninfiniterowofboxes,andtherowstarts
attheleftedgeofthesurroundingbox.Considerthefollowingexample:
\hbox to 8cm {\leaders\copy\centerdot\hfil}
\hbox to 8cm {word\leaders\copy\centerdot\hfil}
whichgives
. . . . . . . . . . . . .
word
. . . . . . . . . . .
Therowofleadersboxesbecomesvisibleassoonasitdoesnotcoincidewithothermate-
rial.
Theabovediscussiononlytalkedaboutleadersinhorizontal mode.Leaderscanequally
wellbeplacedinverticalmode;forboxleadersthe‘infiniterow’thenstartsatthetopof
thesurroundingbox.
VictorEijkhout–T
E
XbyTopic
101
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 from pdf file online; delete pdf pages in preview
C# PDF Page Insert Library: insert pages into PDF file in C#.net
page processing functions, such as 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
delete pages from pdf in reader; delete pages of pdf reader
Chapter9. RulesandLeaders
9.2.3
Evenlyspacedleaders
Aligningsubsequentboxleadersinthewaydescribedabovemeansthatthewhitespace
beforeandaftertheleaderswillingeneralbedifferent.Ifverticalalignmentisnotanissue
itmaybeaestheticallymorepleasingtohavetheleadersevenlyspaced.The\cleaders
commandislike\leaders,exceptthatitsplitsexcessspacebeforeandaftertheleaders
intotwoequalparts,centringtherowofboxesintheavailablespace.
\hbox to 7.8cm {here\cleaders\copy\centerdot\hfil there}
\hbox to 7.8cm {here is\cleaders\copy\centerdot\hfil there}
gives
here . . . . . . . . . . . there
hereis . . . . . . . . . . there
The‘expandingleaders’\xleadersspreadexcessspaceevenlybetween
theboxes,withequalglobsofgluebefore,after,andinbetweenleader
boxes.
\hbox to 7.8cm{here\hskip.7em
\xleaders\copy\centerdot\hfil \hskip.7em there}
gives
here
. . . . . . . . . . there
Notethattheglueintheleaderboxisbalancedherewithexplicitglue
beforeandaftertheleaders;leavingouttheseglueitems,asin
\hbox to 7.8cm {here\xleaders\copy\centerdot\hfil there}
gives
here . . . . . . . . . . . there
whichisclearlynotwhatwasintended.
9.3
Assortedremarks
9.3.1
Rulesandmodes
Aboveitwasexplainedhowrulescanonlyoccurintheappropriatemodes.Rulesalsoin-
fluencemode-specificquantities:nobaselineskipisaddedbeforerulesinverticalmode.In
ordertopreventglueafterrules,T
E
Xsets\prevdepthto-1000pt(seeChapter15).Simi-
larlythe\spacefactorissetto1000aftera\vruleinhorizontalmode(seeChapter19).
9.3.2
Endingaparagraphwithleaders
Anattempttosimulatean\hruleattheendofaparagraphby
\nobreak\leaders\hrule\hfill\par
doesnotwork.ThereasonforthisisthatT
E
Xperformsan\unskipattheendofapara-
graph,whichremovestheleaders.Normallythis\unskipremovesanyspacetokeninser-
tedbytheinputprocessorafterthelastline.Remedy:stickan\hbox{}attheendofthe
leaders.
102
VictorEijkhout–T
E
XbyTopic
VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
PDF: Insert PDF Page. VB.NET PDF - How to Insert a New Page to PDF in VB.NET. Easy to Use VB.NET APIs to Add a New Blank Page to PDF Document in VB.NET Program.
add and delete pages in pdf online; cut pages from pdf reader
C# PDF remove image library: remove, delete images from PDF in C#.
Delete and remove all image objects contained in a to remove a specific image from PDF document page. PDF image in preview without adobe PDF reader component.
cut pages from pdf online; cut pages out of pdf file
9.3. Assortedremarks
9.3.3
Leadersandboxregisters
Intheaboveexamplestheleaderboxwasinsertedwith\copy.Theoutputof
\hbox to 8cm {here\leaders\box\centerdot\hfil there}
\hbox to 8cm {over here\leaders\box\centerdot\hfil
over there}
is
here
. . . . . . . . . .
there
overhere
overthere
Theboxregisterisemptiedafterthefirstleadercommand,butmorethanonecopyisplaced
inthatfirstcommand.
9.3.4
Outputinleaderboxes
Any\write,\openout,or\closeoutoperation appearing inleaderboxesisignored.
Otherwisesuchanoperationwouldbeexecutedonceforeverycopyoftheboxthatwould
beshippedout.
9.3.5
Boxleadersintraceoutput
Thedumpedboxrepresentationobtainedfrom,forinstance,\tracingoutputdoesnot
writeoutboxleadersinfull:onlythetotalsizeandonecopyoftheboxusedaredumped.
Inparticular,thesurroundingwhitespacebeforeandaftertheleadersisnotindicated.
9.3.6
Leadersandshiftedmargins
Ifmarginshavebeenshifted,leadersmaylookdifferentdependingonhowtheshifthas
beenrealized.Foranillustrationofhow\hangindentand\leftskipinfluencethelook
ofleaders,considerthefollowingexamples,where
\setbox0=\hbox{K o }
Thehorizontalboxesabovetheleadersservetoindicatethestartingpointoftherowof
leaders.
First
\hbox{\leaders\copy0\hskip5cm}
\noindent\advance\leftskip 1em
\leaders\copy0\hskip5cm\hbox{}\par
gives
KoKoKoKoKoKoKoKo
KoKoKoKoKoKoKo
Then
\hbox{\kern1em\hbox{\leaders\copy0\hskip5cm}}
\hangindent=1em \hangafter=-1 \noindent
\leaders\copy0\hskip5cm\hbox{}\par
gives(notetheshiftwithrespecttothepreviousexample)
VictorEijkhout–T
E
XbyTopic
103
VB.NET PDF delete text library: delete, remove text from PDF file
adobe PDF reader component installed. Able to pull text out of selected PDF page or all PDF document in .NET WinForms application. Able to delete text characters
delete pages in pdf reader; delete pages from a pdf
VB.NET PDF remove image library: remove, delete images from PDF in
Delete image objects in selected PDF page in ASPX a specific image from PDF document page in VB.NET PDF image in preview without adobe PDF reader component in
delete page on pdf file; delete blank page in pdf online
Chapter9. RulesandLeaders
KoKoKoKoKoKoKoKo
KoKoKoKoKoKoKoKo
Inthefirstparagraphthe\leftskipglueonlyobscuresthefirstleaderbox;inthesecond
paragraphthehangingindentationactuallyshiftstheorientationpointfortherowoflea-
ders.HangingindentationisperformedinT
E
Xbya\moverightoftheboxescontaining
thelinesoftheparagraph.
104
VictorEijkhout–T
E
XbyTopic
C# PDF: PDF Document Viewer & Reader SDK for Windows Forms
BurnAnnotation: Burn all annotations to PDF page. DeleteAnnotation: Delete all selected annotations. guidance for you to create and add a PDF document viewer &
best pdf editor delete pages; delete pages from a pdf online
C# PDF delete text Library: delete, remove text from PDF file in
PDF file in preview without adobe PDF reader component installed in code able to help users delete text characters to pull text out of selected PDF page or all
delete page pdf file; delete pages on pdf
Chapter10
Grouping
T
E
Xhasagroupingmechanismthatisabletoconfinemostchangestoaparticularlocality.
Thischapterexplainswhatsortofactionscanbelocal,andhowgroupsareformed.
\bgroup Implicitbeginningofgroupcharacter.
\egroup Implicitendofgroupcharacter.
\begingroup Openagroupthatmustbeclosedwith\endgroup.
\endgroup Closeagroupthatwasopenedwith\begingroup.
\aftergroup Savethenexttokenforinsertionafterthecurrentgroupends.
\global Makeassignments,macrodefinitions,andarithmeticglobal.
\globaldefs Parameterforoverriding\globalprefixes.IniT
E
Xdefault:0.
10.1 Thegroupingmechanism
Agroupisasequenceoftokensstartingwitha‘beginningofgroup’token,andendingwith
an‘endofgroup’token,andinwhichallsuchtokensareproperlybalanced.
ThegroupingmechanismofT
E
Xisnot thesameastheblockstructureofordinarypro-
gramminglanguages.Mostlanguageswithblockstructureareonlyabletohavelocaldefi-
nitions.T
E
X’sgroupingmechanismisstronger:mostassignmentsmadeinsideagroupare
localtothatgroupunlessexplicitlyindicatedotherwise,andoutsidethegroupoldvalues
arerestored.
Anexampleoflocaldefinitions
{\def\a{b}}\a
givesan‘undefinedcontrolsequence’messagebecause\aisonlydefinedinsidethegroup.
Similarly,thecode
\count0=1 {\count0=2 } \showthe\count0
willdisplaythevalue1;theassignmentmadeinsidethegroupisundoneattheendofthe
group.
Bookkeepingofvaluesthataretoberestoredoutsidethegroupisdonethroughtheme-
chanismofthe‘savestack’.OverflowofthesavestackistreatedinChapter35.Thesave
105
Chapter10. Grouping
stackisalsousedforafewotherpurposes:incallssuchas\hbox to 100pt{...}the
specificationto 100ptisputonthesavestackbeforeanewlevelofgroupingisopened.
Inordertopreventalotoftroublewiththesavestack,IniT
E
Xdoesnotallowdumpinga
formatinsideagroup.The\endcommandisallowedtooccurinsideagroup,butT
E
Xwill
giveadiagnosticmessageaboutthis.
The\aftergroupcontrolsequencesavesatoken forinsertion after thecurrentgroup.
Severaltokenscanbesetasidebythiscommand,andtheyareinsertedintheleft-to-right
orderinwhichtheywerestated.ThisistreatedinChapter12.
10.2 Localandglobalassignments
Anassignmentormacrodefinitionisusuallymadeglobalbyprefixingitwith\global,but
non-zerovaluesoftheintegerparameter\globaldefsoverride\globalspecifications:
if\globaldefsispositiveeveryassignmentisimplicitlyprefixedwith\global,andif
\globaldefsisnegative,\globalisignored.Ordinarilythisparameteriszero.
Someassignmentarealwaysglobal:theglobalassignmentsare
fontassignment assignmentsinvolving\fontdimen,\hyphenchar,and\skewchar.
hyphenationassignment \hyphenationand\patternscommands(seeChapter19).
boxsizeassignment alteringboxdimensionswith\ht,\dp,and\wd(seeChapter5).
interactionmodeassignment runmodesforaT
E
Xjob(seeChapter32).
intimateassignment assignmentstoaspecialintegerorspecialdimen; seepages
82and89.
10.3 Groupdelimiters
Agroupcanbedelimitedbycharactertokensofcategorycode1for‘beginningofgroup’
andcode2for‘endofgroup’,orcontrolsequencetokensthatare\lettosuchcharacters,
the\bgroupand\egroupinplainT
E
X.Implicitandexplicitbracescanmatchtodelimit
agroup.
Groupscanalsobedelimited by \begingroupand\endgroup.Thesetwo control se-
quencesmust beusedtogether:theycannotbematchedwithimplicit orexplicitbraces,
norcantheyfunctionasthebracessurrounding,forinstance,boxedmaterial.
Delimitingwith \begingroupand \endgroupcan providealimited form of run-time
errorchecking.Inbetweenthesetwogroupdelimitersanexcessopenorclosebracewould
resultin
\begingroup ... } ... \endgroup
or
\begingroup ... { ... \endgroup
106
VictorEijkhout–T
E
XbyTopic
10.4. Moreaboutbraces
InbothcasesT
E
Xgivesanerrormessageaboutimproperbalancing.Using\bgroupand
\egroupherewouldmakeanerrormuchhardertofind,becauseoftheincorrectmatching
thatwouldoccur.Thisideaisusedintheenvironmentmacrosofseveralformats.
Thechoiceofthebracecharactersforthebeginningandend ofgroupcharactersisnot
hard-wiredinT
E
X.Itisarrangedlikethisintheplainformat:
\catcode‘\{=1 % left brace is begin-group character
\catcode‘\}=2 % right brace is end-group character
Implicitbraceshavealsobeendefinedintheplainformat:
\let\bgroup={ \let\egroup=}
Specialcasesarethefollowing:
Thereplacementtextofamacromustbeenclosedinexplicitbeginningandend
ofgroupcharactertokens.
Theopenandclosebracesforboxes,\vadjust,and\insertcanbeimplicit.
Thismakesitpossibletodefine,forinstance
\def\openbox#1{\setbox#1=\hbox\bgroup}
\def\closebox#1{\egroup\box#1}
\openbox{15}Foo bar\closebox{15}
Theright-handsideofatokenlistassignmentandtheargumentofthecommands
\write,\message,\errmessage,\uppercase,\lowercase,\special,and
\markisageneraltext,definedas
generaltext−→filler{balancedtextrightbrace
meaningthattheleftbracecanbeimplicit,buttheclosingrightbracemustbean
explicitcharactertokenwithcategorycode2.
Incaseswhereanimplicitleftbracesuffices,andwhereexpansionisnotexplicitlyinhi-
bited,T
E
Xwillexpandtokensuntilaleftbraceisencountered.Thisisthebasisforsuch
constructsas\uppercase\expandafter{\romannumeral80},whichinthisunexpan-
dedformdonotadheretothesyntax.IfthefirstunexpandabletokenisnotaleftbraceT
E
X
givesanerrormessage.
ThegrammarofT
E
X(seeChapter36)usesleftbraceandrightbraceforexplicitcha-
racters,thatis,charactertokens,and{and}forpossiblyimplicitcharacters,thatis,control
sequencesthathavebeen\lettosuchexplicitcharacters.
10.4 Moreaboutbraces
10.4.1 Bracecounters
T
E
Xhastwocountersforkeepingtrackofgroupinglevels:themastercounterandtheba-
lancecounter.Bothofthesecountersaresyntacticcounters:theycounttheexplicitbrace
charactertokens,butarenotaffectedbyimplicitbraces(suchas\bgroup)thatareseman-
ticallyequivalenttoanexplicitbrace.
Thebalancecounterhandlesbracesinallcasesexceptinalignment.Itsworkingsareintui-
tivelyclear:itgoesupbyoneforeveryopeninganddownforeveryclosingbracethatis
notbeingskipped.Thus
VictorEijkhout–T
E
XbyTopic
107
Chapter10. Grouping
\iffalse{\fi
increasesthebalancecounterifthisstatementismerelyscanned(forinstanceifitappears
inamacrodefinitiontext);ifthisstatementisexecutedthebraceisskipped,sothereisno
effectonthebalancecounter.
Themastercounterismoretricky;itisusedinalignmentsinsteadofthebalancecounter.
Thiscounterrecordsallbraces,evenwhentheyareskippedsuchasin\iffalse{\fi.For
thiscounteruncountedskippedbracesarestillpossible:thealphabeticconstants‘{and‘}
havenoeffectonthiscounterwhentheyareusebytheexecutionprocessorasanumber;
theydoaffectthiscounterwhentheyareseenbytheinputprocessor(whichmerelysees
characters,andnotthecontext).
10.4.2 Thebraceasatoken
Explicitbracesarecharactertokens,andassuchtheyareunexpandable.Thisimpliesthat
theysurviveuntilthelaststagesofT
E
Xprocessing.Forexample,
\count255=1{2}
willassign1to\count255,andprint‘2’,becausetheopeningbracefunctionsasadeli-
miterforthenumber1.Similarly
f{f}
willpreventT
E
Xfromformingan‘ff’ligature.
Fromthefactthatbracesareunexpandable,itfollowsthattheirnestingisindependentof
thenestingofconditionals.Forinstance
\iftrue{\else}\fi
willgiveanopenbrace,asconditionalsarehandledbyexpansion.Theclosingbraceis
simplyskippedaspartofthefalsetext;anyconsequencesithasforgroupingonlycome
intoplayinalaterstageofT
E
Xprocessing.
Undelimited macro argumentsareeither singletokens or groupsof tokensenclosed in
explicitbraces.Thusitisnotpossibleforanexplicitopenorclosebracetobeamacro
argument.However,bracescanbeassignedwith\let,forinstanceasin
\let\bgroup={
Thisisusedintheplain\footnotemacro(seepage129).
10.4.3 Openandclosingbracecontrolsymbols
Thecontrolsequences\{and\}donotreallybelonginthischapter,notbeingconcerned
withgrouping.Theyhavebeendefinedwith\letassynonymsof\lbraceand\rbrace
respectively,andthesecontrolsequencesare\delimiterinstructions(seeChapter21).
TheComputerModernRomanfont hasnobraces,buttherearebracesinthetypewriter
font,andformathematicstherearebracesofdifferentsizes–andextendableones–inthe
extensionfont.
108
VictorEijkhout–T
E
XbyTopic
Chapter11
Macros
MacrosareT
E
X’sabbreviationmechanism forsequencesofcommandsthatareneeded
morethanonce,somewhatlikeproceduresinordinaryprogramminglanguages.T
E
X’spa-
rametermechanism,however,isquiteunusual.Thischapterexplains how T
E
Xmacros
work.Italsotreatsthecommands\letand\futurelet.
\def Startamacrodefinition.
\gdef Synonymfor\global\def.
\edef Startamacrodefinition;thereplacementtextisexpandedatdefinitiontime.This
commandistreatedalsointhenextchapter.
\xdef Synonymfor\global\edef.
\csname Startformingthenameofacontrolsequence.
\endcsname Stopformingthenameofacontrolsequence.
\global Makethenextdefinition,arithmeticstatement,orassignmentglobal.
\outer Prefix indicatingthatthemacrobeingdefinedcanbeused on the‘outer’level
only.
\long Prefixindicatingthattheargumentsofthemacrobeingdefinedmaycontain\par
tokens.
\let Defineacontrolsequencetobeequivalenttothenexttoken.
\futurelet Defineacontrolsequencetobeequivalenttothetokenafterthenexttoken.
11.1 Introduction
Amacroisbasicallyasequenceoftokensthathasbeenabbreviatedintoacontrolsequence.
Statementsstartingwith(amongothers)\defarecalledmacrodefinitions,andwriting
\def\abc{\de f\g}
definesthemacro\abc,withthereplacementtext\de f\g.Macroscanbeusedinthis
waytoabbreviatepiecesoftextorsequencesofcommandsthathavetobegivenmorethan
once.AnytimethatT
E
X’sexpansionprocessorencountersthecontrolsequence\abc,it
replacesitbythereplacementtext.
Ifamacroshouldbesensitivetothecontextwhereitisused,itcanbedefinedwithpara-
meters:
109
Documents you may be interested
Documents you may be interested