asp.net pdf viewer component : Print pdf thumbnails SDK control API .net web page winforms sharepoint HTML5_QML_Comparison_redist7-part1353

Appendix F
QML table layout
import Qt 4.7
Item
{
width: 602
height: 202
Rectangle
{
border.width: 2
height: 100
id: topLeft
width: 100
x: 100
y: 1
}
Rectangle
{
anchors.left: topLeft.right
anchors.top: topLeft.top
border.width: 2
height: topLeft.height
id: topCenter
width: topLeft.width * 2
}
Rectangle
{
anchors.left: topCenter.right
anchors.top: topLeft.top
border.width: 2
height: topLeft.height * 2
id: topRight
width: topLeft.width
}
Rectangle
{
anchors.left: topLeft.left
anchors.top: topLeft.bottom
border.width: 2
height: topLeft.height
id: bottomLeft
width: topLeft.width
}
Rectangle
{
anchors.left: bottomLeft.right
53
Print pdf thumbnails - SDK control API:C# PDF Thumbnail Create SDK: Draw thumbnail images for PDF in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Thumbnail Generation with Various Options for Quick PDF Navigation
www.rasteredge.com
Print pdf thumbnails - SDK control API:VB.NET PDF Thumbnail Create SDK: Draw thumbnail images for PDF in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Thumbnail Generation with Various Options for Quick PDF Navigation
www.rasteredge.com
F.QML TABLE LAYOUT
anchors.top: topLeft.bottom
border.width: 2
height: topLeft.height
id: bottomLeftCenter
width: topLeft.width
}
Rectangle
{
anchors.left: bottomLeftCenter.right
anchors.top: topLeft.bottom
border.width: 2
height: topLeft.height
id: bottomRightCenter
width: topLeft.width
}
}
54
SDK control API:C# HTML5 PDF Viewer SDK to view PDF document online in C#.NET
Export PDF in WPF. Print PDF in WPF. PDF Create. Create PDF from Word. Create PDF from Excel. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages
www.rasteredge.com
SDK control API:VB.NET PDF- View PDF Online with VB.NET HTML5 PDF Viewer
View PDF in WPF. Annotate PDF in WPF. Export PDF in WPF. Print PDF in WPF. PDF Create. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page
www.rasteredge.com
Appendix G
Memory tests source code
G.1 Menu (V3)
G.1.1 HTML
<!DOCTYPE html>
<html>
<head>
<title>Main menu</title>
<style type="text/css">
.wraptocenter {
display: table-cell;
text-align: center;
vertical-align: middle;
width800px;
height430px;
}
.wraptocenter * {
vertical-align: middle;
}
</style>
</head>
<body>
<div class="wraptocenter">
<center>
<table>
<tr>
<td align="center">
<a href="../Contacts/contacts.html"><img src="images/contacts.png" /></a>
<br />
<h2>
Contacts
</h2>
</td>
<td align="center">
<a href="../Player/player.html"><img src="images/player.png" /></a>
<br />
<h2>
Player
</h2>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
55
SDK control API:C# PDF Convert to Jpeg SDK: Convert PDF to JPEG images in C#.net
Support of converting from any single one PDF page and multiple pages. Thumbnails can be created from PDF pages. Support for customizing image size.
www.rasteredge.com
SDK control API:C# PDF Print Library: Print PDF documents in C#.net, ASP.NET
WPF Viewer & Editor. WPF: View PDF. WPF: Annotate PDF. WPF: Export PDF. WPF: Print PDF. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page
www.rasteredge.com
G. MEMORY TESTSSOURCE CODE
G.1.2 QML
G.1.2.1 Menu.qml
import Qt 4.7
Loader
{
property url nextSource
id: rootLoader
width: 800
height: 480
resizeMode: Loader.SizeItemToLoader
source: "Contents.qml"
SequentialAnimation
{
id: animation
NumberAnimation { target: rootLoader; property: "opacity"; to: 0; }
ScriptAction { script: source = nextSource; }
NumberAnimation { target: rootLoader; property: "opacity"; to: 1; }
}
}
G.1.2.2 Contents.qml
import Qt 4.7
Item
{
Row
{
anchors.horizontalCenter: parent.horizontalCenter;
anchors.verticalCenter: parent.verticalCenter
MenuItem
{
id: firstItem
image: "images/contacts.png"
fileSource: "../Contacts/Contacts.qml"
text: "Contacts"
}
MenuItem
{
anchors.left: firstItem.right
image: "images/player.png"
fileSource: "../Player/Player.qml"
text: "Player"
}
}
}
G.1.2.3 MenuItem.qml
import Qt 4.7
Item
{
id: itemRoot
property alias image: itemImage.source
property alias text: itemText.text
property string fileSource
56
SDK control API:VB.NET PDF File Compress Library: Compress reduce PDF size in vb.
image resources: Since images are usually or large size, images size reducing can help to reduce PDF file size Embedded page thumbnails. Embedded print settings.
www.rasteredge.com
SDK control API:VB.NET PDF Print Library: Print PDF documents in vb.net, ASP.NET
View PDF in WPF. Annotate PDF in WPF. Export PDF in WPF. Print PDF in WPF. PDF Create. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page
www.rasteredge.com
G.2 Contacts (V3)
width: itemImage.width
height: itemImage.height + itemText.height
Image
{
id: itemImage
MouseArea
{
acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill: parent
hoverEnabled: true
onClicked:
{
rootLoader.nextSource = itemRoot.fileSource;
animation.start();
}
}
}
Text
{
anchors.horizontalCenter: itemImage.horizontalCenter
anchors.top: itemImage.bottom
font.bold: true; font.pixelSize: 24
id: itemText
text: "Contacts"
}
}
G.2 Contacts (V3)
G.2.1 HTML
G.2.1.1 contacts.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="contactsStyle.css" />
<script type="text/javascript" src="contactsCode.js" />
</head>
<body>
<div id="topBar" class="topandbottom">
<div class="close">
<a href="javascript:javascript:history.go(-1)">
<img src="images/close.png" border="0px" />
</a>
</div>
</div>
<div id="dbContents">Shown when n not t using g special QtWebKit t browser.</div>
<div id="bottomBar" class="topandbottom">
<div class="button">
<div class="buttonContent" onclick="startContactAdder();">
Add Contact
</div>
</div>
</div>
</body>
</html>
G.2.1.2 contactsCode.js
function addContact()
{
var nameInput = = document.getElementById(’nameInput’);
57
SDK control API:C# PDF File Compress Library: Compress reduce PDF size in C#.net
image resources: Since images are usually or large size, images size reducing can help to reduce PDF file size Embedded page thumbnails. Embedded print settings.
www.rasteredge.com
SDK control API:VB.NET PDF - Print PDF with VB.NET WPF PDF Viewer
View PDF in WPF. Annotate PDF in WPF. Export PDF in WPF. Print PDF in WPF. PDF Create. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page
www.rasteredge.com
G. MEMORY TESTSSOURCE CODE
var phoneInput = = document.getElementById(’phoneInput’);
if(nameInput.value == null || nameInput.value e == "" ||
phoneInput.value == null || phoneInput.value == "")
{
alert("Please fill l in all fields");
}
else
{
var query = "INSERT into o contacts(name, , phonenumber) ) values (?, ?)";
var values = = [nameInput.value, , phoneInput.value];
FileStoragePlugin.saveToDatabase(query, values);
}
document.body.removeChild(document.getElementById(’contactAdder’));
fillPage();
}
function cancelAdd()
{
document.body.removeChild(document.getElementById(’contactAdder’));
fillPage();
}
function fillPage()
{
document.getElementById("dbContents").innerHTML = FileStoragePlugin.loadFromDatabase();
}
function startContactAdder()
{
var contactAdder = = document.createElement(’div’);
contactAdder.setAttribute("id""contactAdder");
document.body.appendChild(contactAdder);
document.getElementById(’contactAdder’).innerHTML= "<table><tr><td> \
Name:</td><td><input id=\"nameInput\" type=text size=20 maxlength=’128’ />\
</td></tr><tr><td>Phone number:</td><td>\
<input id=\"phoneInput\" type=text size=20 maxlength=\"20\"/>\
</td></tr></table><div id=\"bottomBar\" class=\"topandbottom\">\
<div class=\"button\">\
<div class=\"buttonContent\" onclick=\"addContact();\">\
Accept</div></div><div class=\"button\">\
<div class=\"buttonContent\" onclick=\"cancelAdd();\">\
Cancel</div></div></div>\n";
}
function startDB()
{
var succeeded = = FileStoragePlugin.initializeDatabase(’Contacts’);
if(succeeded == 0)
{
alert("Database initialization failed.");
}
fillPage();
}
window.onload = function()
{
startDB();
}
G.2.1.3 contactsStyle.css
body { font-family: Arial, Helvetica, sans-serif }
td
{
padding:0px;
vertical-align:top;
}
.button
58
G.2 Contacts (V3)
{
border:3px solid black;
float:right;
height:43px;
margin-bottom:5px;
margin-right:5px;
position:relative;
width:225px;
}
.buttonContent
{
font-weight:bold;
font-size:32px;
height:43px;
margin-top:-20px;
position:absolute;
text-align:center;
top:50%;
width:100%;
}
.close
{
margin-right:5px;
margin-top:5px;
}
.topandbottom
{
background-color:#FFF;
height:53px;
position:fixed;
text-align:right;
width100%;
}
#bottomBar
{
bottom:0px;
position:fixed;
right:0px;
}
#contactAdder
{
bottom:0;
background-color:#FFF;
font-size:28px;
height:6em;
left:0;
position: fixed;
width:100%;
}
#dbContents
{
font-size:36px;
font-weight:bold;
margin:0px;
padding:0px;
top:0px;
}
#topBar
{
top:0px;
position:fixed;
left:0px;
}
59
G. MEMORY TESTSSOURCE CODE
G.2.2 QML
G.2.2.1 Contacts.qml
import Qt 4.7
import "importCore" 1.0
Item
{
FileStoragePlugin
{
id: fileStoragePlugin;
Component.onCompleted: {
initializeDatabase("Contacts");
contactsText.text = fileStoragePlugin.loadFromDatabase();
}
}
Image
{
anchors.right: parent.right
anchors.rightMargin: 5
anchors.top: parent.top
anchors.topMargin: 5
id: closeImage
source: "images/close.png"
MouseArea
{
anchors.fill: parent
onClicked:
{
rootLoader.nextSource = "../Menu/Contents.qml"
animation.start();
}
}
}
Button
{
anchors.bottom: parent.bottom
anchors.right: parent.right
id: addButton
onClicked:
{
adder.opacity = 100;
}
text: "Add Contact"
}
Flickable
{
anchors.bottom: addButton.top
anchors.top: closeImage.bottom
clip: true
contentHeight: contactsText.height
height: parent.height - closeImage.height
id: mainFlickable
width: parent.width
Text
{
font.bold: true
font.pixelSize: 32
id: contactsText
text: ""
}
}
ContactAdder
{
anchors.bottom: parent.bottom
60
G.2 Contacts (V3)
height: 160
width: parent.width
id: adder
opacity: 0
}
}
G.2.2.2 ContactAdder.qml
import Qt 4.7
Rectangle
{
color: "white"
Text
{
anchors.leftMargin: 25
font.pixelSize: 32
id: nameText
text: "Name:"
}
Text
{
anchors.leftMargin: 25
anchors.top: nameText.bottom
font.pixelSize: 32
id: numberText
text: "Phone number:"
}
Rectangle
{
anchors.horizontalCenter: phoneField.horizontalCenter
anchors.verticalCenter: nameText.verticalCenter
border.width: 3
height: 43
id: nameField
width: 250
TextEdit
{
anchors.fill: parent
anchors.leftMargin: 5
font.pixelSize: 32
id: nameEdit
}
}
Rectangle
{
anchors.verticalCenter: numberText.verticalCenter
border.width: 3
height: 43
id: phoneField
width: 250
x: 250
TextEdit
{
anchors.fill: parent
anchors.leftMargin: 5
font.pixelSize: 32
id: phoneEdit
}
}
Button
{
anchors.bottom: parent.bottom
anchors.right: parent.right
id: acceptButton
61
G. MEMORY TESTSSOURCE CODE
onClicked:
{
var query = "INSERT into contacts(name, , phonenumber) ) values (?, ?)";
var values = [nameEdit.text, phoneEdit.text];
fileStoragePlugin.saveToDatabase(query, values);
parent.opacity = 0;
nameEdit.text = "";
phoneEdit.text = "";
contactsText.text = fileStoragePlugin.loadFromDatabase();
}
text: "Accept"
}
Button
{
anchors.bottom: parent.bottom
anchors.right: acceptButton.left
onClicked:
{
parent.opacity = 0;
nameEdit.text = "";
phoneEdit.text = "";
}
text: "Cancel"
}
}
G.2.2.3 Button.qml
import Qt 4.7
Rectangle
{
property alias text: innerText.text
signal clicked
anchors.bottomMargin: 5
anchors.rightMargin: 5
border.color: "black"
border.width: 3
height: 43
id: container
width: 225
MouseArea
{
anchors.fill: parent
onClicked: container.clicked()
}
Text
{
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 32
id: innerText
}
}
G.3 Player (V3)
G.3.1 HTML
G.3.1.1 player.html
<!DOCTYPE html>
<html>
62
Documents you may be interested
Documents you may be interested