asp.net open pdf file in web browser using c# : Compress pdf Library application component asp.net windows wpf mvc ibex13-part267

IbexPDFCreator
DevelopersGuide
AbsolutePositioning
125
place.Positivevaluesofbottommovethebottomedgeoftheblock-containerupwards,
makingtheblock-containersmaller.
Ifnoneoftheleft,right,toporbottomattributesisspecifiedtheblock-containerwillbe
thesamesizeasthereferenceareawhichcontainsit.Thisisbecausetheoffsetsalldefault
to"0pt"sotheedgesoftheblock-containerarethesameastheedgesofitscontaining
referencearea.Thismeansablock-containerwithabsolute-position="absolute"whichis
placedinaregionwillbydefaultfillthatregion.
Theheightofablock-containercanbespecifiedwiththeheightattribute,andthewidth
withthewidthattribute.
Figure18-3showstheFOforablockcontainerwithheightandwidthof10cm,andan
innerblock-containerwhichisoffsetfromtheouterone,includinganegativeoffseton
theleftside.TheoutputfromthisFOappearsinFigure18-4.
Figure18-3:
block-containers
positionedandsized
<flow flow-name="body">
<block>
<block-container height="10cm" width="10cm" " margin-left="3cm"
background-color="#dddddd">
<block>outer block container</block>
<block-container absolute-position="absolute"
top="1cm"
right="2cm"
left="-2cm"
bottom="4cm"
background-color="#77ccdd"
>
<block>
inner block-container
</block>
</block-container>
</block-container>
</block>
</flow>
Figure18-4:
block-containers
positionedandsized
outer block k container
inner block-container
Compress pdf - Compress reduce PDF size in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
C# Code & .NET API to Compress & Decompress PDF Document
adjust pdf page size; pdf files optimized
Compress pdf - VB.NET PDF File Compress Library: Compress reduce PDF size in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET PDF Document Compression and Decompression Control SDK
adjust pdf size; pdf paper size
IbexPDFCreator
DevelopersGuide
126
AbsolutePositioning
The example in n Figure e 18-4shows how usinga negative leftvalue willpositionthe
contenttotheleftofthecontainingreferencearea.Thisisthetechniqueusedinthis
manualtoplacethelabelsnexttoeachexample.
C# WPF PDF Viewer SDK to view, annotate, convert and print PDF in
Split PDF Document. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete Existing PDF Pages. Page: Replace
change font size in pdf text box; change page size pdf acrobat
VB.NET Create PDF from PowerPoint Library to convert pptx, ppt to
Split PDF Document. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete Existing PDF Pages. Page: Replace
adjust pdf size preview; pdf compress
Columns
127
Chapter19
Columns
XSL-FOallowsustodefineapagewhichhasmultiplecolumns,justlikethisone.
Thiscanonlybedoneforwholepages,notforpartialpages.Howeverifweareina
regionwhichhasmultiplecolumnswecantreatitasasingle-columnregionandplace
output across the whole width h of the multi-column page by setting span="all" on
block-levelelementswhichappearimmediatelybelowtheflowelement.
Columnsaredefinedbysettingthecolumn-countattributeofabodyregionelementto
avaluegreaterthan1,andoptionallysettingthecolumn-gapattributetodefineagap
betweenthecolumns.
ThepagemasterforthisissimilartotheoneshowninFigure19-1.
Figure19-1:
Thepagemasterfora
multi-columnpage
<simple-page-master
master-name="chapter-2col-odd">
<region-start extent='2.5cm'/>
<region-end extent='2.5cm'/>
<region-body column-count='2'
region-name="body"
margin='2.5cm'/>
<region-after
region-name="footer-odd" extent="2.5cm"/>
<region-before
region-name="header-odd" extent="2.5cm"/>
</simple-page-master>
Alltheblocksabove,includingthisone,havespan="all"setsothattheyspanthewhole
page.
Thisblockdoesnothavespan="all",soit
willbe fittedintothe firstcolumninthe
page.Textwillflowtothebottomofthis
pageandthenstartatthetopofthenext
column.
Ifthereareblocksabovethisoneonthe
pagewhichhavespan="all"(asthereare)
thentheywillremaininplaceandthetext
whichisinonlyonecolumnwillbeplaced
inthenextcolumn,belowthespan="all"
blocks.
We deliberately y repeat the e paragraphto
demonstrate this wrapping. This s block
does not t have span="all", so o it t will l be
fitted into the e first column in the e page.
Textwillflowtothebottomofthispage
and then n start t at the top of the next
column.Ifthereareblocksabovethisone
on the page e (as s there e are) ) which h have
span="all" thentheywillremaininplace
andthetextwhichisinonlyonecolumn
willbeplacedinthenextcolumn, below
thespan="all"blocks.
Itisalsopossibletohaveapagestartwith
contentintwocolumns(likethis).
Whenablock-levelobjectisencountered
whichhasspan="all" thecontentalready
onthepageispusheduptothetop,and
the block k withspan="all" is spread over
thetwocolumns.
VB.NET Create PDF from Word Library to convert docx, doc to PDF in
Split PDF Document. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete Existing PDF Pages. Page: Replace
best pdf compression; pdf change page size
VB.NET PDF- HTML5 PDF Viewer for VB.NET Project
Split PDF Document. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete Existing PDF Pages. Page: Replace
adjust file size of pdf; pdf form change font size
128
Columns
C# HTML5 PDF Viewer SDK to view PDF document online in C#.NET
Split PDF Document. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete Existing PDF Pages. Page: Replace
best way to compress pdf file; change font size pdf comment box
C# PDF Image Extract Library: Select, copy, paste PDF images in C#
PDF ›› C# PDF: Extract PDF Image. How to C#: Extract Image from PDF Document. Support PDF Image Extraction from a Page, a Region on a Page, and PDF Document.
compress pdf; can pdf files be compressed
Bookmarks
129
Chapter20
Bookmarks
BookmarksaretheentrieswhichappearontherightinaPDFfileinAdobeAcrobat.
Theyareusedtonavigatedirectlytolocationswithinthedocument.Theyalsohavea
hierarchicalstructure,whereonebookmarkcancontainasetofchildbookmarkswhich
inturncanthemselvescontainotherbookmarks.
The bookmark-tree element is optional. . Ifused it t should be placed under the root
element, after r the layout-master-set and declarations elements and before e any
page-sequenceorpage-sequence-wrapperelements.
ThestructureofabookmarktreeisshowninFigure20-1.
Figure20-1:
Abookmarktree
<bookmark-tree>
<bookmark internal-destination="section-1">
<bookmark-title>Chapter 1</bookmark-title>
<bookmark internal-destination="section-1-1">
<bookmark-title>Section 1</bookmark-title>
</bookmark>
<bookmark internal-destination="section-1-2">
<bookmark-title>Section 2</bookmark-title>
</bookmark>
</bookmark>
<bookmark internal-destination="section-2">
<bookmark-title>Chapter 2</bookmark-title>
<bookmark internal-destination="section-2-1">
<bookmark-title>Section 1</bookmark-title>
</bookmark>
</bookmark>
</bookmark-tree>
WecanseethefollowingfromthestructureshowninFigure20-1.
• Thebookmarksarecontainedinabookmark-treeelement.
• Abookmarkelementhasaninternal-destinationattributeidentifyingwhereinthe
documentitlinksto.Thevalueforthisattributeshouldbeusedastheidattributeon
thedestinationelement.
• Abookmarkelementcancontainotherbookmarkelements.
• Thetextwhichappearsinthebookmarkiscontainedwithinabookmark-titleelement.
IbexsupportsusingUnicodetextinbookmarks.
TheexampleabovecreatesbookmarksliketheonesintheIbexmanual.
VB.NET PDF Text Extract Library: extract text content from PDF
PDF ›› VB.NET PDF: Extract PDF Text. VB.NET PDF - Extract Text from PDF Using VB. How to Extract Text from PDF with VB.NET Sample Codes in .NET Application.
pdf page size may not be reduced; pdf file size
VB.NET PDF Library SDK to view, edit, convert, process PDF file
Generally speaking, you can use this .NET document imaging SDK to load, create, edit, convert, protect, compress, extract, and navigate PDF document (page).
change font size in pdf comment box; change font size pdf document
IbexPDFCreator
DevelopersGuide
130
Bookmarks
ThebookmarkswhichhavechildbookmarkelementsappearinthePDFfileinaclosed
state,sotheusercanclickthe'+'nexttothemtodisplaythechildelements.Ifyou
specifystarting-state="show"onabookmarkorbookmark-treeelementit'simmediate
childrenwillbevisiblewhenthePDFfileisopened.
Configuration
131
Chapter21
Configuration
AllconfigurationofIbex isdoneusingtheSettingsclasswhichisaccessedfromthe
ibex4.FODocumentobject. Thisclasshas s manypropertieswhichcan be changedto
configuretheoperationofIbex.
Properties of the Settings class should d be e changed d prior to calling the e generate()
methodontheFODocumentobject.ThefactthattheSettingsobjectisapropertyofthe
FODocumentobjectmeansthatdifferentdocumentscanhavedifferentSettingsvalues.
ForexampleFigure21-1showshowtosetthedefaultlineheightto1.4em.
Figure21-1:
Exampleusageofthe
Settingsobject
using System;
using ibex4;
public class IbexTester r {
public static void Main(string[] args) {
FODocument doc = new FODocument()
doc.Settings.LineHeightNormal = "1.4em";
using( Stream xml l =
new FileStream( ( args[0], , FileMode.Open, FileAccess.Read d ) ) ) {
using ( Stream output =
new FileStream( args[1], , FileMode.Create, , FileAccess.Write ) ) {
doc.generate( xml, output t );
}
}
}
}
IbexPDFCreator
DevelopersGuide
132
Configuration
21.1 Fonts
ThefollowingpropertiesontheSettingschangethewayfontsaprocessed.Bydefault
eachabsolutefontsize(small,medium,largeetc.)is1.2timeslargerthantheprevious
size.
Property
Type
Default Notes
XX_Small
string
7.0pt
Mustendin'pt'.
X_Small
string
8.3pt
Mustendin'pt'.
Small
string
10.0pt Mustendin'pt'.
Medium
string
12.0pt Mustendin'pt'.
Large
string
14.4pt Mustendin'pt'.
X_Large
string
17.4pt Mustendin'pt'.
XX_Large
string
20.7pt Mustendin'pt'.
Property
Type
Default Notes
Smaller
string
0.8em
Mustendin'em'.
Larger
string
1.2em
Mustendin'em'.
21.2 Lineheight
The following g properties on the e Settings change the e default t line e height. . Ideally
Settings.LineHeightNormalshouldendin'em'tomakelineheightproportionaltothe
fontheight.
Property
Type
Default Notes
LineHeightNormal
string
1.2em
21.3 Pagesize
ThefollowingpropertiesontheSettingschangethedefaultpagesize.
Property
Type
Default Notes
PageHeight
string
297mm
PageWidth
string
210mm
IbexPDFCreator
DevelopersGuide
Configuration
133
21.4 Includepaths
ThefollowingpropertiesontheSettingseffectretrievingXMLorXSLfiles.
Property
Type
Default Notes
BaseURI_XML
string
ThisvaluesetsthebaseURIforincluding
images and d other r XML L files. When an
external-graphic element specifies a
relative path, Settings.BaseURI_XML L is
the base URI used in n accordance with
therfc2396URISpecification.Whenan
XML file uses an entity to include
anotherXMLfile,Settings.BaseURI_XML
isthebaseURIusedwhenIbexsearches
fortheincludedXMLfile.
BaseURI_XSL
string
ThisvaluesetsthebaseURIforincluding
other XSL L files. When an xsl:include
elementisusedtoinclude anotherXSL
stylesheet,Settings.BaseURI_XSLcanbe
usedtospecifythelocationtheincluded
stylesheetshouldbeloadedfrom.
21.5 Images
ThefollowingpropertiesontheSettingseffectretrievingimagesspecifiedusingthe
external-graphicelement.
Property
Type
Default Notes
BaseURI_XML
string
ThisvaluesetsthebaseURIforincluding
images and d other r XML L files. When an
external-graphic element specifies a
relative path, Settings.BaseURI_XML L is
the base URI used in n accordance with
therfc2396URISpecification.Whenan
XML file uses an entity to include
anotherXMLfile,Settings.BaseURI_XML
isthebaseURIusedwhenIbexsearches
fortheincludedXMLfile.
WebRequestTimeoutMs
int
300
When an external-graphic element
specifies an n image e is retrieved d from a
webserver,thisisthetimeoutusedfor
the call l to o the web server. . Units are
milliseconds.
IbexPDFCreator
DevelopersGuide
134
Configuration
21.6 Borderwidths
ThefollowingpropertiesontheSettingschangethevaluesforborderwidthsspecified
withconstantslike'thin'.
Property
Type
Default Notes
BorderWidthThin
string
1pt
BorderWidthMedium
string
2pt
BorderWidthThick
string
3pt
21.7 Layout
ThefollowingpropertiesontheSettingschangetheappearanceofcontentinthePDF
file.
Property
Type
Default Notes
OverflowIsVisible
bool
true
Bydefaultaregionhasoverflow='auto',
leavingituptheIbextodecidewhether
content which h overflows s the bottom
edge of f a region n is s displayed or
discarded.
If
Settings.OverflowIsVisible
is true, the
contentwillbedisplayed, iffalseitwill
bediscarded.Thispropertyappliesonly
iftheXSL-FOattribute'overflow'isnot
setorissetto'auto'.
21.8 Leaders
The following g properties on the e Settings change e the e values for leader formatting
objects.
Property
Type
Default Notes
LeaderDot
char
.
When leader-pattern='dots', this s is the
characterusedasthedot
Documents you may be interested
Documents you may be interested