IbexPDFCreator
DevelopersGuide
PDF/X
145
Ifonevalueisuseditappliestoallsidesofthepage,iftwovaluesareusedthetopand
bottomedgesusethefirstvalueandtheleftandrightedgesusethesecond.Ifthereare
threevaluesthetopissettothefirstvalue,thesidesaresettothesecondvalue,and
thebottomissettothethirdvalue.Iftherearefourvalues,theyapplytothetop,right,
bottomandleftedgesinthatorder.
The following g attributescan be e specified to set each h side e explicitly: : trim-top-width,
trim-bottom-width,trim-right-width,trim-left-width.
23.4 Overprint
Overprint mode e can be enabled for the entire page e by y specifying the
ibex:ibex-overprint-stroking, ibex:overprint-nonstroking
and
ibex:overprint-mode
attributesasshowninFigure23-4.
Figure23-4:
Settingtheoverprint
mode
<simple-page-master page-height="313mm" page-width="226mm"
master-name="page" ibex:overprint-stroking="true"
ibex:overprint-nonstroking="true" ibex:overprint-mode="1">
Change font size pdf comment box - Compress reduce PDF size in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
C# Code & .NET API to Compress & Decompress PDF Document
advanced pdf compressor; reader pdf reduce file size
Change font size pdf comment box - 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
compress pdf; adjust size of pdf
146
PDF/X
C# PDF Sticky Note Library: add, delete, update PDF note in C#.net
Allow users to add comments online in ASPX webpage. Able to change font size in PDF comment box. Able to save and print sticky notes in PDF file.
can pdf files be compressed; reduce pdf file size
C# PDF File Split Library: Split, seperate PDF into multiple files
RasterEdge.Imaging.Drawing.dll. RasterEdge.Imaging.Font.dll. This C# sample codes explain how to split a PDF file into multiple ones by output PDF file size.
change font size pdf fillable form; can a pdf be compressed
UsingIbexwithVisualBasicandASP
147
Chapter24
UsingIbexwithVisualBasicand
ASP
IbexshipswithbinariesandsourcecodeforaCOMwrapperwhichenablesIbextobe
usedfromVisualBasic6.0andASPapplications.Thiscodecaneitherbeusedas-isoras
the basis s for developing your own wrapper. . This s chapter describes how this COM
wrapperworks.
24.1 TheCOMWrapper
WithintheIbexdistributionisasubdirectorycalled"ibexcom".Inthisdirectoryisthe
sourcefora.NETproject.Thissourceisusedtobuildthefileibexcom.dllwhichisthe
COMwrapperforIbex.
24.1.1 BuildingtheWrapper
TheCOMwrappercanbebuiltusingthe"nmake"command.Themakefileexecutesthe
commandsshowinFigure24-1tobuildandregisteribexcom.dllandibexcom.tlb.
Figure24-1:
Commandstobuild
thewrapper
copy ..\ibex11.dll ibex11.dll
csc /r:ibex11.dll /target:library /out:ibexcom.dll l /unsafe e assemblyinfo.cs
wrapper.cs comstream.cs s ibexinterface.cs
regasm ibexcom.dll /tlb
gacutil -i i ibexcom.dll
gacutil -i i ibex11.dll
24.1.2 VB6Example
ThissectionshowshowtouseIbexfromVB6.IbexshipswithanexampleVB6projectin
thefileTestIbex.vbp.Thestepsbelowdetailhowthisprojectwascreated.Beforeyou
canusetheIbexCOMwrapperyoushouldrunthenmakecommandasdescribedinthe
previoussection.
TheXMLfilesusedinthisexample(book.xsl, hello.fo)shipwithIbexandareinthe
ibexcomdirectory.
FirstcreateanewVB6project,oftype"StandardEXE".UsetheProject->References
menuoptiontoaddareferencetothebothADO2.5andibexcom.tlbfile.Thedialog
shouldlooksomethingliketheoneinFigure24-2.
C# PDF Convert to Jpeg SDK: Convert PDF to JPEG images in C#.net
library component toolkit, C# developers can easily and quickly convert a large-size multi-page Convert PDF to JPEG Using C#.NET. RasterEdge.Imaging.Font.dll.
change font size in pdf comment box; pdf compressor
C# HTML5 PDF Viewer SDK deployment on IIS in .NET
In order to reduce the size of SDK package, dlls are not put into XDoc.PDF.HTML5 Viewer Demo/Bin RasterEdge.Imaging.Font.dll. RasterEdge.Imaging.JBIG2.dll.
pdf change page size; best pdf compressor
IbexPDFCreator
DevelopersGuide
148
UsingIbexwithVisualBasicandASP
Figure24-2:
Addingareferenceto
Ibex
and
TheCOMwrapperprovidesaninterfacecalledIbexComInterface,whichcanbeusedto
declareavariablelikethis:
Dim ibex As ibexcom.IbexCOMInterface
IbexPDFCreator
DevelopersGuide
UsingIbexwithVisualBasicandASP
149
TheimplementationoftheinterfaceiscalledWrapper,andcanbecreatedlikethis:
Set ibex = = New ibexcom.Wrapper
NotethateachinstanceofthewrappercanbeusedtocreateonlyonePDFdocument.
Thecodecontainedintheexampleibextest.vbpprojectis:
Private Sub b Form_Load()
On Error r GoTo errorhandler
Dim ibex As ibexcom.IbexCOMInterface
' create the wrapper object
Set ibex = New w ibexcom.Wrapper
ibex.SetLoggingLevelToInfo
ibex.LogToFile "ibex.log"
' generate file to file
ibex.GenerateFileFile "hello.fo", "hello.pdf"
Set ibex = Nothing
' generate stream to stream
Set ibex = New w ibexcom.Wrapper
Dim strmInput As New Stream
strmInput.Open
' must match encoding of f fo o file or will get t "invalid d data at 1,1" message
strmInput.Charset = = "utf-8"
strmInput.LoadFromFile "hello.fo"
strmInput.Position = 0
Kill "hellostream.pdf"
Dim strmPDF As s New w Stream
strmPDF.Open
ibex.GenerateXMLStreamPDFStream strmInput, strmPDF, True
Set strmInput = Nothing
' save the PDF F stream m to o file, , just to show it works
strmPDF.Position = 0
' will get write error here if file exists
strmPDF.SaveToFile "hellostream.pdf"
Set strmPDF = Nothing
Set ibex = Nothing
' test xslt translation and pdf creation
Set ibex = New w ibexcom.Wrapper
Dim strmXML As s New w Stream
strmXML.Open
' must match encoding of f fo o file or will get t "invalid d data at 1,1" message
strmXML.Charset = "utf-8"
strmXML.LoadFromFile "book.xml"
strmXML.Position = 0
Dim strmXSL As s New w Stream
strmXSL.Open
' must match encoding of f fo o file or will get t "invalid d data at 1,1" message
strmXSL.Charset = "utf-8"
strmXSL.LoadFromFile "book.xsl"
strmXSL.Position = 0
IbexPDFCreator
DevelopersGuide
150
UsingIbexwithVisualBasicandASP
Set strmPDF = New Stream
strmPDF.Open
ibex.GenerateXMLStreamXSLStreamPDFStream strmXML, , strmXSL, , strmPDF, True
Set strmXML = Nothing
Set strmXSL = Nothing
' save the PDF F stream m to o file, , just to show it works
strmPDF.Position = 0
strmPDF.SaveToFile "helloxsl.pdf"
Set strmPDF = Nothing
Set ibex = Nothing
End
errorhandler:
MsgBox Err.Description
End
End Sub
Keythingstonoteare:
APDFfilecanbecreatedfromanFOfiletoaPDFfileondiskusingthiscall:
ibex.GenerateFileFile "hello.fo", "hello.pdf"
APDFfilecanbecreatedfromFOcontainedinStreamtoaPDFStreamusingthiscall:
ibex.GenerateXMLStreamPDFStream strmInput, strmPDF, True
Thefinalparameter(Trueinthiscase)indicatestheoutputstreamshouldbeclosedafter
thePDFfileiscreated.
TheinputStreamobjectispartoftheADO2.5namespace,whichiswhyweaddeda
referencetoADO2.5earlieron.Astreamcanbepopulatedfromafileondiskusingcode
likethis:
strmInput.Open
' must match encoding of f fo o file or will get t "invalid d data at 1,1" message
strmInput.Charset = = "utf-8"
strmInput.LoadFromFile "hello.fo"
strmInput.Position = 0
TocreateaPDFfileusingXSLTtranslation,usethiscall,withtheXMLandXSLreadfrom
StreamobjectsandthePDFwrittentoaStream:
ibex.GenerateXMLStreamXSLStreamPDFStream strmXML, strmXSL, strmPDF, , True
ElementsandAttributes
151
Chapter25
ElementsandAttributes
Thischapterdescribeseachmajorformattingobjectanditsusage.
25.1 Declarationsandpaginationandlayoutformattingobjects
Theobjectsdescribedinthissectionareusedtodefinethegeometryofthepageandto
controlwhichcontentappearswhereonthepage.
IbexPDFCreator
DevelopersGuide
152
ElementsandAttributes
25.1.1 root
Description
ThisisthetoplevelelementintheFOandcontainsthelayout-master-set,anoptional
declarationsandoneormorepage-sequenceelements.Thesechildelementsmustbein
theorderlisted.
Childelement(s)
Thiselementcancontainthefollowingelements:
bookmark-tree (zeroorone)
declarations (zeroorone)
layout-master-set (exactlyone)
page-sequence (zeroormore)
page-sequence-wrapper (zeroormore)
Attributes
Thefollowingattributescanbeusedonthiselement:
media-usage
id
index-key
index-class
ForanexampleshowingtheuseoftheelementseeFigure25-1.
Figure25-1:
Usingroot
<?xml version='1.0' encoding='UTF-8'?>
<root xmlns="http://www.w3.org/1999/XSL/Format">
<layout-master-set>
<simple-page-master master-name="simple">
<region-body margin="2.5cm" region-name="body"
background-color='#eeeeee'/>
</simple-page-master>
</layout-master-set>
<page-sequence master-reference="simple">
<flow flow-name="body">
<block>Hello World</block>
</flow>
</page-sequence>
</root>
IbexPDFCreator
DevelopersGuide
ElementsandAttributes
153
25.1.2 declarations
Description
Thedeclarationsformattingobjectisusedtogroupglobaldeclarationsforastylesheet.
InIbexitactsasacontainerforthecolor-profileelementwhichisusedinPDF/Xfiles.See
143formoreinformation.
Childelement(s)
Thiselementcancontainthefollowingelements:
color-profile 
Parentelement(s)
Thiselementcanbecontainedinthefollowingelements:
root
IbexPDFCreator
DevelopersGuide
154
ElementsandAttributes
25.1.3 color-profile
Description
ThiselementisusedtospecifyanexternalcolorprofilefileusedinthecreationofPDF/X
files.
See143formoreinformation.
Parentelement(s)
Thiselementcanbecontainedinthefollowingelements:
declarations
Attributes
Thefollowingattributescanbeusedonthiselement:
src
color-profile-name
rendering-intent
Documents you may be interested
Documents you may be interested