IbexPDFCreator
DevelopersGuide
Images
105
Theparameters are:
prefix
The startof a URL, such as "http://www.xmlpdf.com". Any imageURL which
starts with this prefixwilluse these credentials.
username the username passed to the remote server
password the password passed to the remote server
domain
the domain name passed to the remote server
Each call to setNetworkCredentials() is passed a prefix which is compared with image
URLs to seewhich set of credentials to use.
For example if your application accesses two HTTP servers using different credentials
your code might look like the code in Figure 16-29. Obviously you would get the
username and password information from somewhere in your application rather than
hard coding them.
Figure 16-29:
Settingcredentials for
differentservers
FODocument doc = new FODocument()
doc.setNetworkCredentials( "http://www.xmlpdf.com","user1","password1","domain1" );
doc.setNetworkCredentials( "http://www.ibex4.com","user2","password2","domain2" );
Internally Ibex uses the System.Net.WebRequest and System.Net.NetworkCredential
objects to pass credentials to the remote server. If credentials have been passed to Ibex
using the setNetworkCredentials() method a new NetworkCredential object is created
when creating the WebRequest object. SO the actual forwarding of the credentials to
the remote server is alldone by the .NET framework.
Calls to setNetworkCredentials() should be made before the generate() method is
called.
16.10 Multi-page TIFF image processing
Ibex has an extension attribute "ibex:page" which is used to specify which page of a
multi-pageTIFF imageshould be included in the PDF file.
FO to placethe third page of a multi-page TIFF image is shown in Figure16-30.
Figure 16-30:
Specifyingthe page of
amulti-page TIFF
image
<block>
<external-graphic src="url('7pages.tif')" ibex:page="3"/>
</block>
Pdf to tiff batch converter - SDK Library service: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
Pdf to tiff batch converter - SDK Library service: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
106
Images
SDK Library service:VB.NET Image: PDF to Image Converter, Convert Batch PDF Pages to
". RasterEdge .NET Imaging PDF Converter makes it professional end users to convert PDF and PDF/A documents are used commonly in daily life (like tiff, jpg, png
www.rasteredge.com
SDK Library service:TIFF to PDF Converter | Convert TIFF to PDF, Convert PDF to TIFF
TIFF to PDF Converter first; Load PDF images from local folders in "File" in toolbar Windows Explorer; Select "Batch Conversion" & Choose "TIFF" in "Output
www.rasteredge.com
Scalable Vector Graphics (SVG) images
107
Chapter 17
Scalable Vector Graphics (SVG)
images
Ibex supports the inclusion of Scalable Vector Graphics (SVG) images in the PDF file. SVG
images retain their vector format inside the PDF file, so will remain precise under high
magnification unlikebitmap images which will be come pixellated.
SVG images are inserted into the document using either the <fo:external-graphic> or
<fo:instream-foreign-object>elements. Images can beincluded inlinelike this:
<fo:block border="1pt solid red">
<fo:instream-foreign-object>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20">
<rect width="10" height="10" fill="green"/>
</svg>
</fo:instream-foreign-object>
</fo:block>
or from an externalfilelike this:
<fo:block border="1pt solid red">
<fo:external-graphic src="url(file.svg)"/>
</fo:block>
where the externalfilecontains the SVG image like this:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20">
<rect width="10" height="10" fill="green"/>
</svg>
If an image occurs more than once in the document it should beloaded from an external
fileso that itis only store in the PDF once.
17.2 Namespaces
The SVG image must begin with the <svg> element in the namespace
"http://www.w3.org/2000/svg". Images which do not declare the namespace will not be
included in the PDF.
SDK Library service:TIFF to GIF Converter | Convert TIFF to GIF, Convert GIF to TIFF
TIFF to GIF Converter first; Load GIF images from local folders in "File" in toolbar Windows Explorer; Select "Batch Conversion" & Choose "TIFF" in "Output
www.rasteredge.com
SDK Library service:TIFF to BMP Converter | Convert TIFF to Bitmap, Convert Bitmap to
Easily to convert TIFF to Bitmap; Simple to convert Bitmap to TIFF; Support TIFF-Bitmap batch conversion; Designed as a standalone image converter software;
www.rasteredge.com
Ibex PDF Creator
Developers Guide
108
Scalable Vector Graphics (SVG) images
17.3 Image size
Thesize of theimage should be specified using the width and heightattributes the outer
<svg> element. These can be absolute measurements such as "3cm" or scalar values
such as "400". Scalar values are assumed to be pixels and are converted to inches based
on 1 pixel = 1/96 inch. Percentages cannot be effectively used; the size of the block
containing the image is determined from the size of the image, at the time the image is
processed the sizeof the containing block is unknown.
17.4 Summary of supported elements
This section briefly documents the degree to which SVG elements are supported in Ibex.
It is not an SVG manual. Information on the SVG specification can be found at
http://www.w3.org/TR/SVG11/expanded-toc.html
Animation of SVG elements using javascriptis notsupported.
17.4.1 <svg>
The <svg> element is used to define the size and shape of the image (using the width
and height attributes) and to establish a new coordinate system using the viewBox
attribute.
17.4.2 <g>
The <g> element used to move the coordinate system using the transform attribute.
Supported transform operations are:
Operation
Effect
translate(x,y)
translate the coordinate system x units horizontally and y units
vertically
translate(x)
translate the coordinate system x units horizontally and zero
units vertically
matrix(a,b,c,d,e,f)
multiply the current transformation matrixby the one specified
scale(x,y)
scale the coordinate system x units horizontally and y units
vertically
rotate(angle)
rotate the coordinatesystem angledegrees aboutthe origin
rotate(angle,x,y)
rotate the coordinatesystem angledegrees aboutthe pointx,y
skewX(angle)
skew thecoordinate system angle degrees along the X axis
skewY(angle)
skew thecoordinate system angle degrees units along the Y axis
Multiple transformations can be performed by placing them one after the other in the
transform attribute, likethis:
<g transform="translate(10,20) scale(2,3) rotate(30)">
Transforms willbeapplied in theorder in which they appear.
SDK Library service:TIFF to JPEG Converter | Convert TIFF to JPEG, Convert JPEG to
Except that TIFF to JPEG Converter has the function that is batch-convert, TIFF to JPEG Converter supports conversions for single JPG file.
www.rasteredge.com
SDK Library service:TIFF to JPEG2000 Converter | Convert TIFF to JPEG2000, Convert
Unlike other image converters, TIFF to JPEG2000 Converter has the capability to make batch image conversion and oft-recurring picture editing simple.
www.rasteredge.com
Ibex PDF Creator
Developers Guide
Scalable Vector Graphics (SVG) images
109
17.4.3 <defs>
The <defs>element is supported as a container for other elements. See <symbol> below
for an example.
17.4.4 <desc>
The<desc> element is ignored.
17.4.5 <title>
The<title> elementis ignored.
17.4.6 <symbol>
The <symbol> element is supported. The following image shows an example of
definining a system using <symbol>and retrieving itusing <use>.
<?xml version="1.0" standalone="yes"?>
<svg width="10cm" height="3cm" viewBox="0 0 100 30"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="MySymbol" viewBox="0 0 20 20">
<rect x="1" y="1" width="8" height="8"/>
<rect x="11" y="1" width="8" height="8"/>
<rect x="1" y="11" width="8" height="8"/>
<rect x="11" y="11" width="8" height="8"/>
</symbol>
</defs>
<use x="45" y="10" width="10" height="10" xlink:href="#MySymbol" fill="blue" />
</svg>
The <use> element will find the symbol element with id="#MySymbol" and display the
contentof this element, which should look likethis:
17.4.7 <use>
The <use> element is supported, see above for an example. Note that as this element
uses
the
xlink:href
attribute
it
is
necessary
to
declare
the
xmlns:xlink="http://www.w3.org/1999/xlink"namespace.
SDK Library service:TIFF to WORD Converter | Convert TIFF to Word, Convert Word to
Word Converter can perfectly convert TIFF file to a Word file and Word to TIFF conversion on a single image as well as on a huge number of images in batch mode
www.rasteredge.com
SDK Library service:TIFF to DICOM Converter | Convert TIFF to DICOM, Convert DICOM to
TIFF to DICOM Converter first; Load DICOM images from local folders in "File" in toolbar Windows Explorer; Select "Batch Conversion" & Choose "TIFF" in "Output
www.rasteredge.com
Ibex PDF Creator
Developers Guide
110
Scalable Vector Graphics (SVG) images
17.4.8 <image>
The<image>element is supported. This element embeds an image inside the SVG image.
For example this image will display a rectangle and on top of that display the image held
in thefile "use_symbol.svg":
<?xml version="1.0"?>
<svg width="4cm" height="2cm" viewBox="0 0 200 100"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg" version="1.1" preserveAspectRatio="none">
<rect width="300" height="150" stroke="red" stroke-width="1" fill="silver"/>
<image x="20" y="20" xlink:href="use_symbol.svg" width="100" height="100"/>
</svg>
17.4.9 <switch>
The<switch> element is ignored.
17.4.10 <path>
The <path> element is supported. Internally PDF does not support quadratic Bézier
curves so they are converted to cubic Bézier curves. The following SVG draws a simple
curve with marked end points:
<?xml version="1.0" standalone="no"?>
<svg width="6cm" height="5cm" viewBox="0 0 1200 600"
xmlns="http://www.w3.org/2000/svg">
<rect x="1" y="1" width="1198" height="598" fill="none" stroke="blue"
stroke-width="1" />
<path d="M200,300 Q400,50 600,300 T1000,300" fill="none" stroke="red"
stroke-width="5"
/>
<!-- End points -->
<g fill="black" >
<circle cx="200" cy="300" r="10"/>
<circle cx="600" cy="300" r="10"/>
<circle cx="1000" cy="300" r="10"/>
</g>
<!-- Control points and lines from end points to control points -->
<g fill="#888888" >
<circle cx="400" cy="50" r="10"/>
<circle cx="800" cy="550" r="10"/>
</g>
<path d="M200,300 L400,50 L600,300
L800,550 L1000,300"
fill="none" stroke="#888888" stroke-width="2" />
</svg>
SDK Library service:TIFF to PNG Converter | Convert TIFF to PNG, Convert PNG to TIFF
TIFF to PNG Converter first; Load PNG images from local folders in "File" in toolbar Windows Explorer; Select "Batch Conversion" & Choose "TIFF" in "Output
www.rasteredge.com
SDK Library service:TIFF to JBIG2 Converter | Convert TIFF to JBIG2, Convert JBIG2 to
Fast speed for single-page image conversion & batch conversion; Easy to drag & drop image to start Once you pay for TIFF to JBIG2 Converter, you will acquire
www.rasteredge.com
Ibex PDF Creator
Developers Guide
Scalable Vector Graphics (SVG) images
111
Thecurve looks likethis:
17.4.10.1 Path line join shapes
The shape where a path changes direction is set with the stroke-linejoin attribute.
Possible values are:
Value
Shape
stroke-linejoin="miter"
Ibex PDF Creator
Developers Guide
112
Scalable Vector Graphics (SVG) images
17.4.12 <rect>
The<rect> elementis supported. A simple rectanglecan be drawn likethis:
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="120" >
<rect x="10" y="10" width="100" height="100" fill="none" stroke="red"/>
</svg>
resulting in this image:
Ibex PDF Creator
Developers Guide
Scalable Vector Graphics (SVG) images
113
17.4.14 <ellipse>
The<ellipse>element is supported. A simpleellipse can bedrawn like this:
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200" >
<ellipse cx="100" cy="100" rx="75" ry="50" fill="none" stroke="black"/>
</svg>
resulting in this image:
Ibex PDF Creator
Developers Guide
114
Scalable Vector Graphics (SVG) images
17.4.15 <line>
The<line>element is supported. A simple linecan be drawn likethis:
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" >
<line x1="10" y1="10" x2="100" y2="10" stroke="blue" stroke-width="4"/>
</svg>
resulting in this image:
Documents you may be interested
Documents you may be interested