free asp. net mvc pdf viewer : Extract text from pdf control application system web page html asp.net console 2010_masters_thesis_buchgraber7-part379

4.3.ExtendingXSL-FOwithSupportfor3DContent
47
Name
Type
Description
Default
type
Enum
(Required) 2D projection n type of the corresponding
view.
Options:
perspective,orthographic
fov
Number
(Requiredforperspective,ignoredfororthographicpro-
jections) This attribute represents the Field Of f View
ofthevirtualcameraanditsvaluecanbespeciedbe-
tween0and180degrees.
90
clipping
Enum
(Optional)Thetype of clipping, that shallbeapplied
forthecurrentview.
Options:
auto,explicit
auto
near
Number
(Requiredforperspectiveprojectionsifexplictclipping
isused) Positive number, dening the position n of the
near clippingplane,if explicitclippingis used. . Other-
wisethis attributeis ignored.
0
far
Number
(Optional) Positive e number that denes the distance
between virtual camera a and d far r clipping plane, , if ex-
plicitclippingis used. . Otherwise e this attributewillbe
ignored. Ifthisattributeis s absent,nofar clippingwill
occur.
Table4.6: Attributeoverviewofthefo3d:projectionelement.
oftheequallynamednearandfarclippingplanein3Dspace,orthogonallytothez-axisinthe
cameracoordinatesystem. Incaseofautomaticclippingwhichisusedbydefault,thenearand
farattributeisignoredandaconformingPDFviewingapplicationshall,basedonthenumber
of3Dobjectsinthescene,automaticallyadjustthepositionofbothplanes.Foramoredetailed
explanationofclippingandthecorrespondingnearandfarclippingplane,itisreferredtothe
specicationoftheprojectiondictionaryinthePDFreference.
4.3.5 JavaScriptSupport
Since PDFadded support for JavaScript as aclient-side scriptinglanguage,such documents
becamemoreandmoreinteractive. Onceprimarilyintendedfortheusewithforms,thePDF
JavaScriptAPIstodayareprovidingaccesstoalmosteveryobjectavailableinaPDFdocument.
Especially3DannotationscanbenetfromJavaScript,providingmore exibilityandsupport
forinteractivevisualizations. Sincethemaingoalofthisworkistheintegrationof3Dcontent
andrelatedmetadata,JavaScriptnearlyprovidesboundlessfreedomindeningscenariosthat
canbenetfromthissynergy.Hence,JavaScriptisthekeytoasuccessfulfusionof3Dcontent
andrelatedsemanticmetadata.
FO3DproposesasimplemethodforaddingJavaScriptcodeto3Dartworksandalsotoenrich
PDF documents withstandarddocument-context JavaScriptcode. . Therefore,three e new ele-
ments areintroduced. . Therst t one,namedscripts,is astructuralelementthatservesas a
containerforthetwootherelements,calledscriptanddoc-script. Both,thescriptandthe
doc-scriptelementcanoccurmultipletimesasdirectdescendantsofthescriptselement.An
Extract text from pdf - Convert PDF to txt files in C#.net, ASP.NET MVC, WinForms, WPF application
C# PDF to Text (TXT) Converting Library to Convert PDF to Text
c# convert pdf to text; convert pdf table to text
Extract text from pdf - VB.NET PDF Convert to Text SDK: Convert PDF to txt files in vb.net, ASP.NET MVC, WinForms, WPF application
VB.NET Guide and Sample Codes to Convert PDF to Text in .NET Project
convert pdf to word text online; convert pdf scanned image to text
48
4.FO3D:3DSupportinXSL-FO
1
<fo:instream-foreign-object>
2
<object-3d src="model.u3d" width="10cm" height="10cm" " xmlns="http://fo3d.
sourceforge.net/ns">
3
4
<scripts>
5
<script src="./js/my-animation.js">
6
/ 3D D JavaScript t API I /
7
host.app.alert(’3D annotation initialized!’);
8
</script>
9
<doc-script type="close">
10
/ Standard d Acrobat JavaScript t API I /
11
app.alert(’PDF says goodbye!’);
12
</doc-script>
13
<doc-script type="open" src="./js/init.js"/>
14
</scripts>
15
16
</object-3d>
17
</fo:instream-foreign-object>
Listing4.4: JavaScriptintegrationexample
Name
Type
Description
Default
src
URI
(Optional) Reference to an external l JavaScript le
whosecodeisaddedtothe3DJavaScriptstreamthatis
executed duringthe initializationof the corresponding
PDF3Dartwork.
Table4.7: Attributeoverviewofthefo3d:scriptelement.
expressiveexampleisprovidedinListing4.4. Amoredetaileddescriptionofthescriptand
thedoc-scriptelementisgiveninthefollowing.
3DJavaScriptSupport
TheFO3Dscriptelementisusedtoimprove3DvisualizationsinPDFdocumentsandsupports
the integrationof f JavaScript code, according to o the 3D D JavaScript t API [2]. . Similar r to the
integrationofJavaScriptcodein(X)HTMLdocumentsandasshowninListing4.4,theFO3D
scriptelementdistinguishesbetweentwodierentmethodsforaddingJavaScriptcodetothe
3Dartwork. The e JavaScript code caneither be directly insertedas the content of ascript
element,oritcanbeloadedfromanexternalJavaScriptle,usingthesrcattribute. Altough
thescriptelementhasjustoneattribute,theattributeoverviewispresentedinTable4.7for
thesakeofcompleteness.
Bothmethods canbe e combinedin a single script t element, concatenating g the external and
the internal JavaScript code. . Since e external JavaScript les more likely containa collection
ofreusableobject andfunction n denitions, itmakessense toexecute itpriortothe internal
JavaScript code,whichpossiblyis basedontheexternally denedcode. . Similar r to this con-
catenation,theJavaScriptcodeofmultiplescriptelementsisalsoconcatenatedintheorder
itappearsbeneaththescriptscontainerelement.Hence,itisalsopossibletoloadmorethan
oneexternalJavaScriptletoaparticular3Dstream.
C# PDF Text Extract Library: extract text content from PDF file in
XDoc.PDF ›› C# PDF: Extract PDF Text. C# PDF - Extract Text from PDF in C#.NET. Feel Free to Extract Text from PDF Page, Page Region or the Whole PDF File.
best pdf to text converter; converting pdf to searchable text format
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.
convert pdf to text file using; converting pdf to plain text
4.3.ExtendingXSL-FOwithSupportfor3DContent
49
Name
Type
Description
Default
type
Enum
(Required) The type of the occurring event,for r which
thispieceofJavaScriptcodeshallbeexecuted.
Options:
open,close,page-open,page-close
src
URI
(Optional)ReferencetoanexternalJavaScriptle.
Table4.8: Attributeoverviewofthefo3d:doc-scriptelement.
InPDFdocuments,3D-relatedJavaScriptcodeisrepresentedbyaPDFstreamobject,which
is referredto o by the OnInstantiate e key y of the corresponding 3D D stream dictionary. . As s this
dictionarykeysuggests,aconformingPDFviewerapplicationwillexecutetheJavaScriptcode,
whenacorresponding3Dannotationisinitialized.
Document-Context JavaScriptSupport
Similar tothe JavaScript code that canbedenedfor a 3Dstream m object, the e doc-script
elementprovidestheability toaddJavaScript codethat willbeexecutedinthecontext ofa
PDFdocument.Thedoc-scriptelementalsoallowstheinlinedenitionofJavaScriptcode,as
wellastheinclusionofanexternalJavaScriptle,referencedbythesrcattribute.Incontrast
tothescriptelementthatexpects JavaScriptcodethat isbasedonthe3DJavaScript API,
thedoc-scriptelementacceptsdocument-contextJavaScriptcode,suchasdenedforAdobe
Acrobatin[3].
Sincedocument-levelJavaScriptcodecanbeusedinresponsetovariousoccurringevents,the
typeattributeexplicitlyspecieswhenthecorrespondingcodeshallbeexecuted. Concerning
theintegrationof3DobjectsandPDFdocuments,notallavialableeventsareofgreatinterest,
buttheself-explanatory subsetofopen,close,page-open andpage-close e eventsatleast t covers
a wide range of imaginable scenarios. . The e denitionof the type is, in contrast t to o the src
attribute,mandatory.
Thesmallcollectionoftwoattributes,supportedbythedoc-scriptelement,andtheircorre-
spondingexplanationisshowninTable4.8.
The mostinterestingevent might be the opening of aPDF document (type: : open),because
itisoftenusedforinitializationpurposesandthedenitionofadditionalJavaScriptfunctions
thatcanbeusedlater. ThistypeofJavaScriptcodeisaddedtothePDFdocumentbydirectly
referring to theJavaScript stream object with the OpenAction n key y of the root PDF catalog
dictionary. JavaScriptcodethatshallbeexecutedifthePDFdocumentisclosed,isspeciedin
aso-calledAdditional-ActionsDictionary,againreferredtobythecatalogdictionary.JavaScript
codethat shallbeexecutedwhen n aPDFpage isopenedorclosedin the viewerapplication,
is alsospeciedin an Additional-Actions Dictionary, but t in n this s case it is referenced d by y the
correspondingPDFpageobject.
C# PDF Image Extract Library: Select, copy, paste PDF images in C#
Image: Extract Image from PDF. |. Home ›› XDoc.PDF ›› C# PDF: Extract PDF Image. How to C#: Extract Image from PDF Document.
convert pdf picture to text; converting pdf to editable text
VB.NET PDF Image Extract Library: Select, copy, paste PDF images
Image: Extract Image from PDF. |. Home ›› XDoc.PDF ›› VB.NET PDF: Extract PDF Image. VB.NET PDF - Extract Image from PDF Document in VB.NET.
convert pdf to rich text format; text from pdf
50
4.FO3D:3DSupportinXSL-FO
Name
Type
Description
Default
src
URI
(Required) Reference to o an external l le, , containing
3Dcontentora2Dcomputergraphics.
name
String
(Required) Unique identier, that t can be used d for r ac-
cessingthisresourcein3DJavaScript.
Table4.9: Attributeoverviewofthefo3d:resourceelement.
4.3.6 AdditionalResources
A3Dobjectcanbeenrichedtremendouslybyaddingadditionalresourcesthatarenotpartofthe
original3Dcontentitself.The3DstreamdictionarythereforedenestheResourceskey,which
canrefertoaPDFNameTree,mappingnamestringstoobjects. Theseobjectscanbeloaded
byJavaScriptcodethatis,forexample,executedduringtheinitializationofthecorresponding
3Dannotation.SincenotallavailablePDFobjectsaresuitablefortheuseina3Denvironment,
onlytwo-dimensionalgraphicsandadditional3Dobjectscanbeused. The3DJavaScriptAPI
providesseveralroutines,sothatanattachedimageresourcecan,forexample,dynamicallybe
loadedandappliedasatexture,oradditional3Dcontentcanbeplacedanywhereintheexisting
scene.
1
<fo:instream-foreign-object>
2
<fo3d:object-3d src="model.u3d" " width="10cm" " height="10cm">
3
4
<fo3d:resources>
5
<fo3d:resource src="http://example.com/ball.u3d" name="ball"/>
6
<fo3d:resource src="../img/face.jpg" name="tex"/>
7
<!  ...   >
8
</fo3d:resources>
9
10
</fo3d:object-3d>
11
</fo:instream-foreign-object>
Listing4.5: Addingresources(3Dobjectsorimages)tothePDF3Dannotation
TheFO3Dresourceselementservesasacontainerformultiplechildelements,havingthename
resource. Anoverviewofattributesthatcanbedenedforaresourceelementispresented
inTable4.9andanexampleofhowresourcesaredenedinFO3DisshowninListing4.5.
The src c attribute e is used toreference an external two- - or r eventhree-dimensional l computer
graphics andthenameattributeprovidesauniqueidentier for thecurrentresource,whichis
usedforthedynamicinstantiationbymeansofJavaScriptcode. Both,the e srcandthename
attributearemandatory.
4.3.7 CustomFO3DExtensions
By using XSLT as a language for r transformingarbitrary y XML L input, FO as s a language for
describingthevisualappearance ofadocumentandFO3Dasa toolforprovidingadditional
support for 3Dcontent, , a wide range e of f rich and interactive PDF 3Dvisualizations can be
C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net
Page: Extract, Copy and Paste PDF Pages. Easy to Use C# Code to Extract PDF Pages, Copy Pages from One PDF File and Paste into Others in C#.NET Program.
remove text from pdf; convert pdf to rich text
C# PDF insert text Library: insert text into PDF content in C#.net
Text to PDF. C#.NET PDF SDK - Insert Text to PDF Document in C#.NET. Providing C# Demo Code for Adding and Inserting Text to PDF File Page with .NET PDF Library.
change pdf to text file; convert pdf to word to edit text
4.3.ExtendingXSL-FOwithSupportfor3DContent
51
FO3D Plugin
+
+
+
+
+
ExtensionHandler 1
… ..
ExtensionHandler N
…..
Extensions
Resources
3D Views
JavaScript Stream
Default - 3D View
Figure4.3: Schematicoverviewof anFO3D plugin,showingits internalcomponents and
thecooperationwithcustomextensionhandlers.
realized. However, , insome cases s theproposed d work ow might t still l not t be powerfulenough.
Forexample,by means ofXSLTandJavaScript,it isnotpossibletogenerateabinaryimage
orloadany arbitraryexternallethat isreferencedfromtheXMLinput andshallaectthe
visualappearanceofthe3Dcontent.Therefore,additionalsupportduringthePDFgeneration
processhastobeprovided.
TheFO3DextensionselementprovidestheabilityofstoringcustomXMLelements,without
specifyinganystructuralorcontent-relatedrestrictions.Ingeneral,thepurposeofthiselement
issimilartothefo:instream-foreign-objectelement,whichalsoprovidesamethodforex-
tendingtheFOdocumentwithcustomXMLdata,suchasSVGorevenFO3D.Incontrastto
thefo:instream-foreign-object,thedescendantsoftheextensionselementaredenedin
thesameFO3Dnamespaceandthenumberofchildnodesisnotlimitedtoone.
LikeanFO processordoes not understandtheproposedFO3Dvocabulary by default,acor-
responding FO3Dprocessor r plugin is s also not by default able to process descendants of the
extensions element. . Therefore,aconformingFO3Dprocessor r needstoprovidean n interface
for the dynamic registration n of additional handlers. . Such h ahandler, hereafter r referredto as
FO3DExtHandler,isregisteredby the nameoftheelementit isprovidingsupport for. . Since
apluginistypically writteninsamelanguageasitshost program,theFO3Dpluginandthe
FO3DExtHandlersmightusethesameprogramminglanguageastheunderlyingXSL-FOpro-
cessoritself.
AconformingFO3DplugincallsthecorrespondingFO3DExtHandlerfor everysingleelement
that isachildnodeoftheextensionselement,havingthe supportedandregisteredelement
name. WhencallingsuchanFO3DExtHandler,thecorrespondingelement,itsattributesand
descendants arepassedtoit. . Inadditiontothat,anFO3DExtHandler r alsohasaccesstothe
internalrepresentationofallpreviouslydecribedPDFprimitives,suchasthe3Dannotation,the
3Dstream,thedefaultview,thelistofpredenedviews,thelistofresourcesandtheJavaScript
streams.AschematicoverviewofanFO3Dplugin,itsinternalcomponentsandthecooperation
witharbitraryFO3DExtHandlersisoutlinedinFigure4.3.
VB.NET PDF Page Extract Library: copy, paste, cut PDF pages in vb.
VB.NET: Extract PDF Pages and Save into a New PDF File. You VB.NET: Extract PDF Pages and Overwrite the Original PDF File. Instead
batch convert pdf to txt; convert pdf to word searchable text
C# PDF Text Search Library: search text inside PDF file in C#.net
Text: Search Text in PDF. C# Guide about How to Search Text in PDF Document and Obtain Text Content and Location Information with .NET PDF Control.
convert pdf file to text; c# extract text from pdf
52
4.FO3D:3DSupportinXSL-FO
1
<fo:instream-foreign-object>
2
<object-3d src="board.u3d" width="10cm" height="10cm" " xmlns="http://fo3d.
sourceforge.net/ns">
3
4
<extensions>
5
<pgn src="http://www.example.com/chessgame.pgn"/>
6
</extensions>
7
8
</object-3d>
9
</fo:instream-foreign-object>
Listing4.6: Exemplaryusageoftheproposedfo3d:extensionselement.
In Listing 4.6, the exemplary y use of the proposed d FO3D D extensions s element t is s shown. . In
thisexample,anexternallecontainingachessgame,whichisencodedinthePortableGame
Notation (PGN) format [24],is s referenced. . Acorresponding g FO3DExtHandler could,for ex-
ample, attach 3D chessmenmodels as s additional l resources, then load the external PGNle
andtransformallcontainedchess movestoJavaScript animations ona virtualchessboardin
3Dspace.
VB.NET PDF Form Data Read library: extract form data from PDF in
featured PDF software, it should have functions for processing text, image as you how to read or retrieve field data from PDF and how to extract and get
convert pdf to plain text online; convert scanned pdf to text
Chapter5
FO3D:AnApacheFOPPlugin
Thischapterdescribesaprototypeimplementation,whichextendsthewide-spreadApacheFOP
withacustomfo:instream-foreign-objectextensiontoprovideadditionalsupport for the
FO3DvocabularythathasbeendescribedinChapter4. AshortdescriptionofhowApacheFOP
canbeenhancedbycustom-made extensions is presentedinSection5.1,directly followedby
a more e detailed explanation regarding the e FO3D D extension itself. . Finally, , a few w additional
enhancementstoenablebidirectionallinkingbetweentheembedded3Dcontentandtheresulting
PDFdocumentarepresentedinSection5.3.
5.1 ExtendingApacheFOP
ApacheFOPprovidesvariousmethods for extendingitsstandardfunctionalityandtherefore,
additionalelements,renderersandhandlermodulesforcustomXMLvocabulariescanbeadded.
ThefollowingexplanationisbasedonApacheFOP,version0.95,whichiscurrentlythemost
recentstableversion[45].ForbuildingacustomApacheFOPextension,suchasneededtoadd
supportfortheproposedFO3Dvocabulary,theJavapackageorg.apache.fop.fo.extensions
andespeciallyorg.apache.fop.fo.extensions.svg,aregoodresourcestostartfrom. Inthe
following,threedierenttypesofApacheFOPextensionsaredescribedmoreprecisely.
CustomXMLelements areacceptedby y ApacheFOP,after theyandtheircorresponding
Javaobjectrepresentationhavebeenregistered. Thefollowingenumerationexplainshowthis
isdonewithoutmanipulatingtheoriginalsourcecodeitself.
1. Atrst,aclassthatextendstheabstractorg.apache.fop.fo.ElementMappingclasshas
tobecreated. TheElementMappingrepresentsastatichashmap,whichisloadedduring
thebootstrapinitializationandcontainsallelementsthataredenedinaparticularXML
53
54
5.FO3D:AnApacheFOPPlugin
namespace. This s makes it easier r for r Apache FOP P to create e a custom object for every
element.
2. TomakeApacheFOPawareofthenewlycreatedclass,thele:
\/META-INF/services/org.apache.fop.fo.ElementMapping"hastobecreatedanditshall
containthefullyqualiedclassnameofthenewElementMappingimplementation.During
itsinitialization,ApacheFOPwilllookforsuchlesintheclasspathanddynamicallyload
theclassesthatarereferredtobytheirfullyqualiedclassnames.
3. Finally,aJavaArchive(JAR)hastobecreatedandtheresultingJARlehastobeputin
theclasspath.WhenstartingApacheFOPnow,theelementJavaclassesthatarereferred
tofromthecustomElementMappingclass,willberegistered.
XML handlers s are e dened d for a specic XMLnamespace andare e able e to process s corre-
spondingelementsandattributes. ApacheFOP,bydefault,containsanXMLhandler,whichis
responsibleforprocessingXMLdatathatisdenedintheSVGnamespace. XMLdatafroma
non-XSLnamespace,suchasSVG,cantypicallybedirectlyembeddedinXSL-FOdocuments,
as descendants of the fo:instream-foreign-object element, , whichhas s already beenintro-
ducedinSection4.2.ThecreationofacustomXMLhandlerisassimpleastheabovedescribed
creationofanelementmappingclass. Againanewclasshastobecreated,butinthiscase,it
shallimplementtheorg.apache.fop.render.XMLHandler interface. . To o informApacheFOP
abouttheexistenceofthisnewXMLhandler class,thefullyqualiedJavaclassnamehasto
bestoredinthele:\/META-INF/services/org.apache.fop.render.XMLHandler".
Renderers canalsobecustomizedbyimplementingtheorg.apache.fop.render.Renderer
interface, or r just extending g the e abstract class org.apache.fop.render.AbstractRenderer,
whichalready does most of whatis neededand d the subclass s just has to dene therepresen-
tationofprimitiveslikePage,Viewport,Region,Span,Block,Line andInline,accordingtothe
dedicatedoutput format. . Similar r tothedenitionofacustomelement or XMLhandler,an
additionalRendererclassisdynamicallyregisteredbystoringitsfullyqualiedJavaclassname
inthele: \/META-INF/services/org.apache.fop.render.Renderer".
5.2 SupportforFO3D
BasedonthepreviouslydescribedextensioninterfacesofApacheFOP,supportforcustomXML
datafromtheFO3Dnamespaceisadded,sothatitisnallypossibletocreatePDFdocuments,
containing3Dartworks.
5.2.SupportforFO3D
55
5.2.1 GeneralIntegration
TheJavaclassesthatextendApacheFOPfortheusewiththeFO3Dvocabularyaregenerally
locatedin the net.sourceforge.fo3d d package and d its s sub-packages. . The e integration of the
FO3Dpluginisexplained,stepbystep,inthefollowing.
TransforminganFOdocumentthatcontainsFO3Ddata,byusingthestandardApacheFOP,
willshowawarningthatindicates thattheFOprocessor doesnot knowwhattodowiththe
givenFO3Ddataandthereforeignoresit. Forexample,thewarningfortheFO3Dnamespace
andtheunknownobject-3delementlooksasfollows:
23.04.2010 15:21:53 3 org.apache.fop.fo.ElementMappingRegistry findFOMaker
WARNUNG: Unknown formatting g object http://fo3d.sourceforge.net/ns^object-3d
TomakeApacheFOPawareofFO3Delements,theJavaclass FO3DElementMappingregisters
thefollowingtwoclasses,coveringallelementsfromtheFO3Dvocabularythathavebeenin-
troducedinChapter4:
 TheFO3DObjclassextendstheabstractXMLObjclassofApacheFOPandisregisteredas
the generalrepresentationof any elementthatis denedintheFO3Dnamespace. . This
class just t informs Apache FOP P about the supported XML namespace and the default
namespace prex. . Other r necessary y methods s are already y dened inthe e parent t XMLObj
class.
 The FO3DElement extends the general FO3DObj class and represents a a specialized im-
plementation for r the topmost fo3d:object-3d d element. . This s implementation is s also
straightforward, but t this class additionally overloads the getDimension method,which
inApacheFOPisrequiredforchildnodesofthefo:instream-foreign-objectelement
and used to determine its intrinsic dimensions. . In n case e of FO3D, , the e dimensions are
speciedbythewidthandheightattributeoftheobject-3delement.
ApacheFOPnowacceptsFO3Delements andis abletoholdthecorrespondingJavaobjects
inhis internaltreestructures. . TryingtotransformtheFOdocumentnowwillnotcauseany
errors,buttheFO3DdatawillbeignoredbecauseApacheFOPdoesnotknowwhattodowith
itandthereforejustshowsthefollowingwarning:
23.04.2010 16:05:08 8 org.apache.fop.render.AbstractRenderer r renderXML
WARNUNG: Some XML content will be ignored.
No handler r defined for r XML: http://fo3d.sourceforge.net/ns
Obviously,thenextstepis the registration n ofanXMLhandler r that is capable ofprocessing
FO3Ddata.Therefore,theFO3DPDFHandler,whichimplementstheXMLHandlerJavainterface,
56
5.FO3D:AnApacheFOPPlugin
is addedto Apache FOP P as s an n extension. . The e XMLHandler interface is straightforward and
declaresjustthreemethods,whichareexplainedinthefollowinglisting:
 ThegetNamespacemethodinformsApacheFOPduringtheregistrationprocedureofthe
correspondingXMLhandlerclass,whichXMLnamespaceitsupports.
 Later, during g the formatting process, , the XML L handler will be called for every y XML
elementofthenamespaceitisregisteredfor.SinceApacheFOPallowstheregistrationof
multipleXMLhandlersforoneandthesameXMLnamespace,suchahandleris,before
its execution, asked whether the currently chosen output format is supported d or r not.
ThereforethesupportsRenderermethodiscalledwiththecurrent rendererobject and
theXMLhandlercandecideitself.
 FinallythehandleXMLmethodisresponsibefortheprocessingofthecorrespondingXML
data. Therefore,the e XML handler receives a RendererContext object, containing the
current Renderer and d various s additionalinformation,dependingonthecurrent output
format. Inadditiontothiscontextinformation,anorg.w3c.dom.Documentobject,repre-
sentingthecustomXMLstructure,isalsogiventotheXMLhandler.
5.2.2 RenderingtoPDF
ThisworkisprimarilyfocusedonthegenerationofPDFlescontainingrich3Dcontent.There-
fore,theApacheFOPJavapackages org.apache.fop.render.pdfandorg.apache.fop.pdf
areof great relevance, because they encapsulate all PDF related classes. . Incontrast t to the
org.apache.fop.render.pdf package, , whichcontains s allrenderer-related d classes, the pack-
age org.apache.fop.pdf covers various PDF objects,such as the basic types s andinherited
implementations.
SincetheFO3DPDFHandleris justsupportingPDFas arendertarget,thehandleXMLmethod
willbecalledwithaRendererContextthatcontainsareferencetothePDFDocumentobjectand
thePDFRendereritself. Asthenamesuggests,thePDFDocumentclassistheobject-orientedrep-
resentationoftheresultingPDFdocumentandprovidesvariouspublicmethodslikeaddObject,
whichallowstheappendingofadditionalPDFobjects,suchas3Dannotationsand3Dstreams.
AlmostallJavaequivalentstorelevantPDFobjectsareinheritedfromthePDFObjectbaseclass.
SincegeneralPDFdictionaryandstreamclassesarealreadyavailableinApacheFOP,all3D-
relatedclassesdenedbytheFO3Dpluginarebasedonexistingimplementations.Forexample,
thePDF3DStreamDictionary is s intheFO3Dpluginrepresentedby theclassPDF3DStream,
whichextendsthePDFStreamclassofApacheFOP.Figure5.1providesanoverviewof3D-related
PDFclasses,complementedwiththeFO3DApacheFOPplugin.
Documents you may be interested
Documents you may be interested