mvc pdf : Convert pdf to tiff multiple pages software control dll windows web page wpf web forms ibex9-part68

IbexPDFCreator
DevelopersGuide
Tables
85
Figure15-13:
Tablewithimplicit
rows
row 1 column 1
row 1 column 2
row 2 column 1
row 2 column 2
15.5 Table columns
Thetable-column elementisusedtosetthecolumnwidthandothercharacteristicsofa
table column. A table-column element has an associated column number which
determines which column thetable-column element refers to. Thiscolumn number is
either implied (with the firsttable-column element applying to the first column, the
secondtothenextetc.),orexplicitlysetusingthecolumn-numberattribute.
Asingletable-column element can be used todefinethe style of multiple columnsby
usingthenumber-columns-spannedattribute.
Figure 15-14showstheFOforatable with twotable-column elements,which apply to
thefirstandsecondcolumns.Inthiscasetheysetthecolumnwidths(to30%and70%),
andthegivethesecondcolumnashadedbackground.TheoutputcreatedfromtheFO
appearsinFigure15-15.
Figure15-14:
FOusingtable-column
elements
<table>
<table-column column-width='30%'/>
<table-column column-width='70%'
background-color='#dddddd'/>
<table-body>
<table-row>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 1 column 1</block>
</table-cell>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 1 column 2</block>
</table-cell>
</table-row>
<table-row>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 2 column 1</block>
</table-cell>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 2 column 2</block>
</table-cell>
</table-row>
</table-body>
Figure15-15:
Tablewithdefined
columnwidths
row 1 column 1
row 1 column 2
row 2 column 1
row 2 column 2
Somecellattributessuchasbackgroundcoloraredeterminedusingattributesfromthe
cellitselfandfromtheotherelementsofthetablestructure.Theorderofprecedencein
determining cell characteristics such as background-color is table-celltable-row ,
table-body,table-columnandfinallytable.
15.6 Proportional column widths
Columnscanbeallocatedwidthswhichareproportionaltothewidthsofothercolumns.
Forexample,ifwehavetwocolumnsandwanttogivethefirstcolumntwicethewidth
Convert pdf to tiff multiple pages - software control dll:C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net, ASP.NET MVC, Ajax, WinForms, WPF
Online C# Tutorial for How to Convert PDF File to Tiff Image File
www.rasteredge.com
Convert pdf to tiff multiple pages - software control dll:VB.NET PDF Convert to Tiff SDK: Convert PDF to tiff images in vb.net, ASP.NET MVC, Ajax, WinForms, WPF
Free VB.NET Guide to Render and Convert PDF Document to TIFF
www.rasteredge.com
IbexPDFCreator
DevelopersGuide
86
Tables
of the second, we can specify column widths using the proportional-column-width()
function as shown in Figure 15-16. The total of the values used in the
proportional-column-width()functionsis3(2+1),sothefirstcolumnwillgave2/3ofthe
widthandthesecond1/3.TheoutputfromthisFOappearsinFigure15-17.
Figure15-16:
FOusingproportional
columnwidths
<table>
<table-column
column-width='proportional-column-width(2)'/>
<table-column
column-width='proportional-column-width(1)'
background-color='#dddddd'/>
<table-body>
<table-row>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 1 column 1</block>
</table-cell>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 1 column 2</block>
</table-cell>
</table-row>
<table-row>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 2 column 1</block>
</table-cell>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 2 column 2</block>
</table-cell>
</table-row>
</table-body>
Figure15-17:
Outputfrom
proportionalwidth
example
row 1 column 1
row 1 column 2
row 2 column 1
row 2 column 2
15.7 Spanning columns and rows
The number of columns which a cell spans is set by the number-columns-spanned
attribute.AnexampleFOforthisisshowninFigure15-18.Inthisexamplethefirstcellof
thefirstrowspanstwocolumns.TheoutputfromthisFOappearsinFigure15-19.
Figure15-18:
FOforcellspanning2
columns
<table>
<table-column column-width="30%"/>
<table-column column-width="70%"
background-color="#dddddd"/>
<table-body>
<table-row>
<table-cell border="1pt solid blue" padding="2pt"
number-columns-spanned="2">
<block>row 1 column 1</block>
</table-cell>
</table-row>
<table-row>
<table-cell border="1pt solid blue" padding="2pt">
<block>row 2 column 1</block>
</table-cell>
<table-cell border="1pt solid blue" padding="2pt">
<block>row 2 column 2</block>
</table-cell>
</table-row>
</table-body>
software control dll:C# PDF Page Insert Library: insert pages into PDF file in C#.net
pages from various file formats, such as PDF, Tiff, Word, Excel and Insert Multiple PDF Pages to PDF Document Using C# demo code to insert multiple pages of a
www.rasteredge.com
software control dll:VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
Able to add and insert one or multiple pages to existing adobe PDF document in VB.NET. Add and Insert Multiple PDF Pages to PDF Document Using VB.
www.rasteredge.com
IbexPDFCreator
DevelopersGuide
Tables
87
Figure15-19:
Cellspanningtwo
columns
row 1 column 1
row 2 column 1
row 2 column 2
Thenumberof rowswhich a cell spans is set by thenumber-rows-spanned attribute.
ExampleFOforthisisshowninFigure15-20.Inthisexamplethefirstcellofthefirstrow
spanstworows.TheoutputfromthisFOappearsinFigure15-21.
Figure15-20:
FOforcellspanning
tworows
<table>
<table-column column-width='30%'/>
<table-column column-width='70%'
background-color='#dddddd'/>
<table-body>
<table-row>
<table-cell border='1pt solid blue' padding='2pt'
number-rows-spanned='2'>
<block>row 1 column 1</block>
</table-cell>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 1 column 2</block>
</table-cell>
</table-row>
<table-row>
<table-cell border='1pt solid blue' padding='2pt'>
<block>row 2 column 2</block>
</table-cell>
</table-row>
</table-body>
Figure15-21:
Outputforcell
spanningtworows
row 1 column 1
row 1 column 2
row 2 column 2
15.8 Cell separation
XSL-FOhastwowaysofprocessingthebordersofadjacentcellsdependingonthevalue
oftheborder-collapseattributeonthetable.
Ifborder-collapse="collapse",whichisthedefault,thereisnogapbetweencellsandthe
bordersof adjacentcellsaremerged(or"collapsed")togetasinglebordersharedby
both cells. Therules for combining borders are explained in the XSL-FO specification.
Broadly speaking the widest border will be used. This is called the collapsed border
model.
If border-collapse="separate"adjacentbordersarenotmerged.A gapcanbeinserted
between adjacent borders using the border-spacing attribute. The border-spacing
attribute can have one or two values. If one value is specified (for instance
border-spacing="1mm")the verticalandhorizontalspacing between cellsissettothis
value. If two values are specified separated by a space (for instance
border-spacing='1mm 3mm') thehorizontalseparation isset tothe first value andthe
verticalseparationissettothesecond.Thisiscalledtheseparatedbordermodel.
Thefollowingexamplesuseatablewithonerowcontainingtwocells.Thefirstcellhasa
bottomborder,theseconddoesnot.Thetablealsohasabottomborder.
In the separate border modelthe borderfrom the firstcellwill be drawn before the
borderofthetableasshowninFigure15-22.
software control dll:C# PDF Convert to Jpeg SDK: Convert PDF to JPEG images in C#.net
NET library to batch convert PDF files to quality jpeg file can be exported from PDF in .NET Turn multiple pages PDF into single jpg files respectively online.
www.rasteredge.com
software control dll:VB.NET PDF Convert to Jpeg SDK: Convert PDF to JPEG images in vb.
VB.NET Excel, VB.NET PowerPoint, VB.NET Tiff, VB.NET Able to Convert PDF to JPEG file in .NET WinForms and ASP Export high quality jpeg file from PDF in .NET
www.rasteredge.com
IbexPDFCreator
DevelopersGuide
88
Tables
Figure15-22:
Cellswithseparate
borders
this cell has
a bottom
border
this cell does
not have a bottom
border
In the collapsed border model the border from the firstcell will be merged with the
borderofthetableandasingleborderwillbedrawnasshowninFigure15-23.
Figure15-23:
Cellbordercollapsed
withtableborder
this cell has
a bottom
border
this cell does
not have a bottom
border
Ifweaddaninnerbordertoeachcellwecanseethiswiththeseparatemodel,asshown
inFigure15-24.
Figure15-24:
Separatecelland
tableborders
this cell has
a bottom
border
this cell does
not have a
bottom border
Withthecollapsedbordermodeltheborderbetweenthetwocellswillbehalfthewidth
itisintheseparatemodel,asshowninFigure15-25.
Figure15-25:
Collapsedborders
this cell has
a bottom
border
this cell does
not have a bottom
border
Figure 15-26 shows an example of a table with separate borders. Note how the
border-spacing on theprevioustable setsthe spacebetween cellsonly,notthespace
between thecellandthetableborder.Thisspacecan besetusingpadding.If weadd
padding="2mm"tothetablewegetthelayoutshowninFigure15-27.
Figure15-26:
Tablewithseparate
borders
cell one
cell two
cell three
cell four
Figure15-27:
Cellsseparatedfrom
thetablebordersby
padding
cell one
cell two
cell three
cell four
15.9 Table headers
Table headers are created using the table-header element. The table-header should
appear inside the table element after any table-column elements and before any
table-bodyelements.The table-headerelementissimilarinstructuretoa table-body
elementinthatitcontainstable-row elements.
software control dll:C# Create PDF from Tiff Library to convert tif images to PDF in C#
Similarly, Tiff image with single page or multiple pages is supported. Description: Convert to PDF/TIFF with specified zoom value and save it on the disk.
www.rasteredge.com
software control dll:C# PDF File Split Library: Split, seperate PDF into multiple files
using RasterEdge.XDoc.PDF; Split PDF file by number of pages. This is an C# example of splitting a PDF file into multiple ones by number of pages.
www.rasteredge.com
IbexPDFCreator
DevelopersGuide
Tables
89
This section describes the behavior of table headers which do not change. Headers
whichcanhavedifferentcontentondifferentpagesaredescribedlaterinthischapterin
thesectiononcontinuationmarkersonpage91.
Figure 15-28showstheFOforasimpletable with aonerow headerandtwocontent
rows.TheoutputcreatedbytheFOappearsinFigure15-29.
Figure15-28:
Simpletablewith
header
<table>
<table-column column-width="100%"/>
<table-header>
<table-row>
<table-cell border="1pt solid black" padding="5pt">
<block>Heading</block>
</table-cell>
</table-row>
</table-header>
<table-body>
<table-row>
<table-cell border="1pt solid black" padding="5pt">
<block>row 1</block>
</table-cell>
</table-row>
<table-row border="1pt solid black" padding="5pt">
<table-cell>
<block>row 2</block>
</table-cell>
</table-row>
</table-body>
</table>
Figure15-29:
Tablewithsimple
header
Heading
row 1
row 2
Table headersare repeatedatthe topof thetable after each page break. Thisisthe
default. To prevent the table header appearing on pages after the first, specify
table-omit-header-at-break="true"onthetable element.
15.10 Table footers
Tablefootersarecreatedusingthetable-footerelement.Thetable-footershouldappear
insidethetable elementafteranytable-column andtable-headerelementsandbefore
anytable-body elements.Thetable-footerelementissimilarinstructuretoatable-body
elementinthatitcontainstable-row elements.
Itisacommonerrortoplacethetable-footerelementattheendofthetable,afterthe
table-bodyelements.Itmustbeplacedbeforethe table-bodyelementsbecauseIbex
maystartrenderingthetabletoPDFbeforethewholetablehasbeenreadfromtheFO
file.
Thissectiondescribesthebehavioroftablefooterswhichdonotchange.Footerswhich
canhavedifferentcontentondifferentpagesaredescribedlaterin thischapterin the
sectiononcontinuationmarkersonpage91.
software control dll:VB.NET PDF File Split Library: Split, seperate PDF into multiple
Split PDF File by Number of Pages Demo Code in VB.NET. This is an VB.NET example of splitting a PDF file into multiple ones by number of pages.
www.rasteredge.com
software control dll:VB.NET TWAIN: Scanning Multiple Pages into PDF & TIFF File Using
allows one connection, please make sure there is only one acquisition object in the application in the process of scanning multiple pages into PDF or TIFF file
www.rasteredge.com
IbexPDFCreator
DevelopersGuide
90
Tables
Figure15-30showstheFOforasimpletablewithaonerowheaderandfooterandtwo
contentrows.TheoutputcreatedbytheFOappearsinFigure15-31.
Figure15-30:
FOforsimpletable
withheaderand
footer
<table>
<table-column column-width="100%"/>
<table-header>
<table-row>
<table-cell border="1pt solid black" padding="5pt">
<block>Heading</block>
</table-cell>
</table-row>
</table-header>
<table-footer>
<table-row>
<table-cell border="1pt solid black" padding="5pt">
<block>Footer</block>
</table-cell>
</table-row>
</table-footer>
<table-body>
<table-row>
<table-cell border="1pt solid black" padding="5pt">
<block>row 1</block>
</table-cell>
</table-row>
<table-row border="1pt solid black" padding="5pt">
<table-cell>
<block>row 2</block>
</table-cell>
</table-row>
</table-body>
</table>
Figure15-31:
Tablewithsimple
headerandfooter
Heading
row 1
row 2
Footer
Tablefootersarerepeatedatthebottomofthetablebeforeeachpagebreak.Thisisthe
default. To prevent the table footer appearing on pages other than the last, specify
table-omit-footer-at-break="true"onthetable element.
15.11 Behavior at page breaks
15.11.1 Repeatingheaders
Table headersare repeatedatthe topof thetable after each page break. Thisisthe
default. To prevent the table header appearing on pages after the first, specify
table-omit-header-at-break="true"onthetable element.
software control dll:VB.NET Create PDF from Tiff Library to convert tif images to PDF
Convert tiff to PDF document free online. with VB.NET sample code to finish Tiff to PDF conversion work Tiff image with single page or multiple pages is supported
www.rasteredge.com
software control dll:C# TIFF: Extract Page(s) from TIFF File(s) Using C#.NET Code
component, C#.NET Tiff image processing control empowers developers to extract single or multiple pages from a Tiff file, and extract multiple pages from two
www.rasteredge.com
IbexPDFCreator
DevelopersGuide
Tables
91
15.11.2 Repeatingfooters
Tablefootersarerepeatedatthebottomofthetablebeforeeachpagebreak.Thisisthe
default. To prevent the table footer appearing on pages other than the last, specify
table-omit-footer-at-break="true"onthetable element.
15.11.3 Repeatingtableborders
Tablebordersbydefaultdonot repeatat abreakin thetable,sothetopborderofa
table is rendered only on the first page the table is on and the bottom border is
renderedonlyonthelastpage.
Tomake thetable bottomborderrepeatat each pagebreakitisnecessary tospecify
border-after-width.conditionality="retain"onthetableelement.
To make the table top border repeat at each page break it is necessary to specify
border-before-width.conditionality="retain"onthetableelement.
15.12 Table continuation markers
Table continuation markers provide a way of dynamically changing the header and
footeronatablesothatdifferentcontentcanbedisplayedondifferentpages.Atypical
useofthisfeatureistoputthewords"continuedonnextpage"inthefooterofatable
onallpagesexceptthelast.
Hereweexaminehowthe"continuedonnextpage"requirementcanbesatisfiedusing
Ibex.TheapproachtakenbyXSL-FOhastwoparts,implementedusingthemarkerand
retrieve-table-marker elements. First a retrieve-table-marker element is added to the
footer.WhenthePDFiscreatedthiselementwillbereplacedbythecontentsofoneof
the marker elements which has the same class name. The marker element which
appears in the footer depends on the values of the attributes on the
retrieve-table-marker.
The footer for this example is shown in Figure 15-32. As the PDF file is created the
contentsof the markerelementwith marker-class-name ="continued" willbelocated
andinsertedintothetable-footerelement. Thecontentof themarkerelementmustbe
valid FO elements for their location in the table-footer. In this example the retrieved
elementsgodirectlyunderthetable-footerelement,sotheelementsretrievedmustbe
table-rowelements.
Figure15-32:
FOfor
retrieve-table-marker
<table-footer>
<retrieve-table-marker
retrieve-class-name="continued"
retrieve-position-within-table="first-starting"
retrieve-boundary-within-table="page"/>
</table-footer>
Typically,therewillbemorethanonemarkerelementwhichhasthemarker-class-name
="continued". If this is not the case then the footer content will never change. The
retrieve-positionattributespecifieswhichmarkertoretrieve.Inthisexamplewewant
the first marker which appears on the page, so we use retrieve-position =
IbexPDFCreator
DevelopersGuide
92
Tables
"first-starting-within-page".Wealsospecify retrieve-boundary ="table" soanymarker
fromanypartofthetablewhichhasbeenoutputtoPDFcanberetrieved.Otheroptions
aredetailedlaterinthissection.
Conceptually,IbexlooksateveryrowinthetablewhichhasbeenoutputtothePDFfile
(including rowson thecurrentpage), collects all themarkersassociatedwith each of
thoserowsandselectsonetogointothefooter.Markersassociatedwithrowswhich
arenoton eitherthe currentpageor priorpagesarenot considered. Itispossibleto
have a different marker associated with every row in the table. This is useful for
situationssuchaslikerenderingarunningtotal.
Thesecondpartof theprocessistodefineoneormoremarkerelements.Inthiscase
ourmarkerelementsareassociatedwithtable-row elements. Thefirsttable-rowhasa
markerelementwhichspecifiesthe"continuedonnextpage"text.Thecontentsofthis
markerwillberetrievedforallpagesexceptthelast.
Thelastrowof thetablehasanempty markerelement.Thecontentofthis(thatisto
saynorows)willbewhatappearsinthefooteronthelastpageofthetable.Themarker
fromthefirstrowisshowninFigure15-33andthemarkerfromthelastrowisshownin
Figure15-34.
Figure15-33:
FOformarkerinthe
firsttablerow
<table-row>
<marker marker-class-name="continued">
<table-row>
<table-cell>
<block>continued on next page/<block>
</table-cell>
</table-row>
</marker>
<table-cell>
<block>row 1 cell 1 /<block>
</table-cell>
</table-row>
Figure15-34:
FOformarkerinthe
lasttablerow
<table-row>
<marker marker-class-name="continued"/>
<table-cell>
<block>row (last) cell 1 /<block>
</table-cell>
<table-row>
15.13 Aligning columns at the decimal point
Ibex can align the contents of cells in a column on the decimal point by specifying
text-align="." on each fo:table-cell in the column. This can be done explicity on each
fo:table-cell, or to make things easier to maintain it can be done by specifying
text-align="." on the fo:table-column and text-align="from-table-column" on each
fo:table-cell.
Example FO for aligning columnsis shown in Figure 15-35 andthe resulting outputis
showninFigure15-36.
IbexPDFCreator
DevelopersGuide
Tables
93
Figure15-35:
FOfordecimalpoint
alignment
<table font="10pt arial">
<table-column column-width="50%" />
<table-column column-width="50%" text-align="."/>
<table-body>
<table-row>
<table-cell border="1pt solid black" padding="3pt" >
<block>ibexdls</block>
</table-cell>
<table-cell border="1pt solid black" padding="3pt"
text-align="from-table-column()">
<block>499.02</block>
</table-cell>
</table-row>
<table-row>
<table-cell border="1pt solid black" padding="3pt" >
<block>Total</block>
</table-cell>
<table-cell border="1pt solid black" padding="3pt"
text-align="from-table-column()" font-size="18pt">
<block>499.00</block>
</table-cell>
</table-row>
</table-body>
</table>
Figure15-36:
Outputfordecimal
pointalignment
ibexdls
499.02
Total
499.00
94
Tables
Documents you may be interested
Documents you may be interested