c# pdfsharp sample : Online form pdf output control SDK system web page winforms asp.net console Linux-DeveloperGuide-PCCPlus3-part1347

document and is clicked
onHighlightEvent(eventName , highlightXML)
This is the event passed by viewer 
when a certain text is selected by used 
and added as Highlight, Link, Tag or 
Redaction.
onPagesAllLoaded()
Fired when all pages in the document 
have been loaded
onThumbView()
Fired when user clicks on thumbnail 
view button
onFullView()
Fired when user comes out of the 
thumbnail view
tabChanged ( nameOfActivatedTab:String )
Event fired when tab is changed in the 
viewer
Highlight Events Sent by viewer
JS method that is called : onHighlightEvent ( eventName , highlightXML ) 
eventNames 
highlightSaveMenuOpened
highlightAdd
highlightExistingMenuOpened
highlightMenuCancelled
highlightRemove
highlightOpenLink
Example:
<script language="javascript">
function viewerOnDocumentPrint(documentname)
{
alert(“document: ” + documentname);
}
function viewerOnSelectText(documentname,pagenumber,startpos,endpos,selecetdtext)
{
alert(startpos+" "+endpos);
}
function onHighlightEvent(eventName, highlightXML)
{
alert(eventName + "  " + highlightXML);
}
</script>
Show an alert and redirect on Server Error
Send an HTTP Status Error Code 500 from server for this event to trigger
<script language="javascript">
function OnDocumentError(documentname,pageNumber)
{
ViewerEnterprise.alert(“Some error occurred”);
location.href=”error.aspx”;
}
</script>
31
Online form pdf output - extract form data from PDF in C#.net, ASP.NET, MVC, Ajax, WPF
Help to Read and Extract Field Data from PDF with a Convenient C# Solution
extract data from pdf c#; extracting data from pdf forms
Online form pdf output - VB.NET PDF Form Data Read library: extract form data from PDF in vb.net, ASP.NET, MVC, Ajax, WPF
Convenient VB.NET Solution to Read and Extract Field Data from PDF
sign pdf form reader; collect data from pdf forms
Chapter 7
Translations
Prizm Content Connect has a built in translation option to allow document text translation using a 
translation service.
Translation service can be set to anything or you can use the free translation services like Google 
Translate or Yahoo Bablefish etc.
Translation Variables
Name
Description
Value
translationTool
Turns translation on/off
Yes/No
translationPoweredBy
Allows you to write 
Powered by text. Serves 
the legal requirement by 
some free translation 
engines like Google.
langFrom
Sets the languages to be 
allowed to choose for. 
This the set of 
languages from which 
translation can occur
langFrom=English,Afrikaans,Albanian,Arab
ic,Belarusian,Bulgarian,Chinese,Croatian,C
zech,Danish,Dutch,Estonian,Filipino,Finnis
h,French,Galician,German,Greek,Hebrew,
Hindi,Hungarian,Icelandic,Indonesian,Irish
,Italian,Japanese,Korean,Latvian,Lithuania
n,Macedonian,Malay,Maltese,Norwegian,P
ersian,Polish,Portuguese,Romanian,Russia
n,Spanish,Serbian,Slovak,Slovenian,Swahil
i,Swedish,Thai,Turkish,Ukrainian,Vietname
se,Welsh,Yiddish
langTo
Sets the languages to be 
allowed to choose for. 
This the set of 
languages to which 
translation can occur
langTo=Afrikaans,Albanian,Arabic,Belarusi
an,Bulgarian,Chinese,Croatian,Czech,Dani
sh,Dutch,English,Estonian,Filipino,Finnish,
French,Galician,German,Greek,Hebrew,Hin
di,Hungarian,Icelandic,Indonesian,Irish,Ita
lian,Japanese,Korean,Latvian,Lithuanian,M
acedonian,Malay,Maltese,Norwegian,Persi
an,Polish,Portuguese,Romanian,Russian,S
panish,Serbian,Slovak,Slovenian,Swahili,S
wedish,Thai,Turkish,Ukrainian,Vietnamese
,Welsh,Yiddish
tanslationServiceURL
The url which performs 
the translation and 
returns the translated 
text
tanslationServiceURL=/translate/translatio
n.php
Example Code (Using SWF Object):
<script src="swfobject.2.2.js" language="javascript"></script> 
<script type="text/javascript">  
var params = { 
wmode: 'opaque',
scale: 'noscale',
32
C# PDF File Split Library: Split, seperate PDF into multiple files
Free download library and use online C# class source codes files with other PDF files to form a new starts from 0. For example, your original PDF file contains
cannot save pdf form in reader; saving pdf forms in acrobat reader
VB.NET PDF Password Library: add, remove, edit PDF file password
' Define input and output file path. As String = Program.RootPath + "\\" 3_pw_a.pdf" ' Create a passwordSetting.IsAnnot = True ' Allow to fill form.
extract data from pdf file to excel; pdf data extraction tool
allowFullScreen: true,
allowScriptAccess: 'always',
bgcolor: '#ffffff'
}; 
var attributes = {  
id: ‘ViewerEnterprise’,  
name: ViewerEnterprise’
}; 
var flashvars = {  
documentname: '<? echo $filename; ?>',
saveDocumentLocation: 'savedocument.php?document=<? echo $filename; ?>',
translationTool: 'Yes',
langFrom:'English,Afrikaans,Albanian,Arabic,Belarusian,Bulgarian,Chinese,Croatian,Czech,Dani
sh,Dutch,Estonian,Filipino,Finnish,French,Galician,German,Greek,Hebrew,Hindi,Hungarian,Icel
andic,Indonesian,Irish,Italian,Japanese,Korean,Latvian,Lithuanian,Macedonian,Malay,Maltese,
Norwegian,Persian,Polish,Portuguese,Romanian,Russian,Spanish,Serbian,Slovak,Slovenian,Sw
ahili,Swedish,Thai,Turkish,Ukrainian,Vietnamese,Welsh,Yiddish',
langTo:'Afrikaans,Albanian,Arabic,Belarusian,Bulgarian,Chinese,Croatian,Czech,Danish,Dutch,E
nglish,Estonian,Filipino,Finnish,French,Galician,German,Greek,Hebrew,Hindi,Hungarian,Icelan
dic,Indonesian,Irish,Italian,Japanese,Korean,Latvian,Lithuanian,Macedonian,Malay,Maltese,No
rwegian,Persian,Polish,Portuguese,Romanian,Russian,Spanish,Serbian,Slovak,Slovenian,Swahi
li,Swedish,Thai,Turkish,Ukrainian,Vietnamese,Welsh,Yiddish',
translationPoweredBy:'Powered by Google Translate',
tanslationServiceURL: 'translate/translation.php'
}; 
swfobject.embedSWF("ViewerEnterprise.swf?<? echo time();?>", "documentviewer", "620", "800", 
"10.0.0", false, flashvars, params, attributes); 
</script>
<noscript>
Javascript needs to be enabled to view the document in viewer.
</noscript>
<div id="documentviewer"></div>
Example Translation Service (PHP) (Using Google API Translate)
<?php  
header('Content-Type: text/html; charset=utf-8');
$langFrom=$_POST["langFrom"];
$langTo=$_POST["langTo"];
$text = $_POST["text"];
$langFrom=getLanCode($langFrom);
$langTo=getLanCode($langTo);
translate($text,$langFrom,$langTo);
function getLanCode($langC)
{
switch ($langC) 
{
33
VB.NET PDF File Split Library: Split, seperate PDF into multiple
This online VB tutorial aims to illustrate the process of PDF document splitting. Split PDF File by Output File Size Demo Code in VB.NET.
extract pdf data into excel; how to type into a pdf form in reader
C# Create PDF from Excel Library to convert xlsx, xls to PDF in C#
Quick integrate online C# source code into .NET class. RootPath + "\\" 1.xlsx"; String outputFilePath = Program.RootPath + "\\" Output.pdf"; // Load an
filling out pdf forms with reader; extracting data from pdf files
Case "Afrikaans":
$langcode="af";
break;
Case "Albanian":
$langcode="sq";
break;
Case "Arabic":
$langcode="ar";
break;
Case "Belarusian":
$langcode="be";
break;
Case "Bulgarian":
$langcode="bg";
break;
Case "Catalan":
$langcode="ca";
break;
Case "Chinese":
$langcode="zh-CN";
break;
Case "Croatian":
$langcode="hr";
break;
Case "Czech":
$langcode="cs";
break;
Case "Danish":
$langcode="da";
break;
Case "Dutch":
$langcode="nl";
break;
Case "English":
$langcode="en";
break;
Case "Estonian":
$langcode="et";
break;
Case "Filipino":
$langcode="tl";
break;
Case "Finnish":
$langcode="fi";
break;
Case "French":
$langcode="fr";
break;
Case "Galician":
$langcode="gl";
break;
Case "German":
$langcode="de";
break;
34
C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net
C# class source codes and online demos are String inputFilePath = Program.RootPath + "\\" 1.pdf"; PDFDocument doc inputFilePath); // Convert and output to a
make pdf form editable in reader; extract data from pdf form to excel
C# Create PDF from Tiff Library to convert tif images to PDF in C#
Online demo allows converting tiff to PDF online. Program.RootPath + "\\" 1.tif"; String outputFilePath = Program.RootPath + "\\" Output.pdf"; // Load a
extract data from pdf file; pdf form save with reader
Case "Greek":
$langcode="el";
break;
Case "Hebrew":
$langcode="iw";
break;
Case "Hindi":
$langcode="hi";
break;
Case "Hungarian":
$langcode="hu";
break;
Case "Icelandic":
$langcode="is";
break;
Case "Indonesian":
$langcode="id";
break;
Case "Irish":
$langcode="ga";
break;
Case "Italian":
$langcode="it";
break;
Case "Japanese":
$langcode="ja";
break;
Case "Korean":
$langcode="ko";
break;
Case "Latvian":
$langcode="lv";
break;
Case "Lithuanian":
$langcode="lt";
break;
Case "Macedonian":
$langcode="mk";
break;
Case "Malay":
$langcode="ms";
break;
Case "Maltese":
$langcode="mt";
break;
Case "Norwegian":
$langcode="no";
break;
Case "Persian":
$langcode="fa";
break;
Case "Polish":
$langcode="pl";
break;
Case "Portuguese":
35
C# PDF Password Library: add, remove, edit PDF file password in C#
Support to add password to PDF document online or in C# passwordSetting.IsAnnot = true; // Allow to fill form. and update password for an encrypted PDF file in
pdf form field recognition; exporting pdf form to excel
C# PDF File Merge Library: Merge, append PDF files in C#.net, ASP.
Free online C#.NET source code for combining Word, Excel and PowerPoint data to PDF form. inputFilePath2, inputFilePath3 }; // Combine three PDF files and output
pdf form data extraction; pdf data extraction
$langcode="pt";
break;
Case "Romanian":
$langcode="ro";
break;
Case "Russian":
$langcode="ru";
break;
Case "Serbian":
$langcode="sr";
break;
Case "Slovak":
$langcode="sk";
break;
Case "Slovenian":
$langcode="sl";
break;
Case "Spanish":
$langcode="es";
break;
Case "Swahili":
$langcode="sw";
break;
Case "Swedish":
$langcode="sv";
break;
Case "Thai":
$langcode="th";
break;
Case "Turkish":
$langcode="tr";
break;
Case "Ukrainian":
$langcode="uk";
break;
Case "Vietnamese":
$langcode="vi";
break;
Case "Welsh":
$langcode="cy";
break;
Case "Yiddish":
$langcode="yi";
break;
}
return $langcode;
}
function translate($text,$srcLang = 'en',$destLang = 'hi') {
$text = urlencode($text);
$destLang = urlencode( $destLang );
$srcLang = urlencode( $srcLang );
36
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
Create editable Word file online without email. inputFilePath = Program.RootPath + "\\" 1.pdf"; PDFDocument doc inputFilePath); // Convert and output to a
how to save pdf form data in reader; extract data from pdf forms
C# Create PDF from PowerPoint Library to convert pptx, ppt to PDF
Free online PowerPoint to PDF converter without email. RootPath + "\\" 1.pptx"; String outputFilePath = Program.RootPath + "\\" Output.pdf"; // Load a
pdf data extractor; c# read pdf form fields
$trans = @file_get_contents("http://ajax.googleapis.com/ajax/services/language/translate?
v=1.0&q={$text}&langpair={$srcLang}|{$destLang}");
$translate = explode('translatedText":"',$trans);
$translate = explode('"},',$translate[1]);
echo "<root>";
echo "<translation from='" . $srcLang . "' to='" . $destLang . "'>";
//echo $translate[0];
echo $translate[0];
echo "</translation>";
echo "</root>";
}
?>
37
Chapter 8
Localizing the Viewer
Prizm Content Connect can be totally localized to the languages needed. 
For example to display German Language tooltips, simply pass FlashVar as
locale=german. 
where german is the german.xml residing at same location as ViewerEnterprise.swf 
XML shown below is a sample xml for locale=english
To generate xml for any other language or change the text, simply replace the xml nodes with 
local language text. Example for locale=hindi you can have xml node PreviousPage as 
<PreviousPage>पछल 
 
ष</PreviousPage>
<tooltips>
<PreviousPage>Previous</PreviousPage>
<DateFormat>MMMM D, YYYY</DateFormat>
<CurrentPage>Current Page</CurrentPage>
<TotalPages>Total Pages</TotalPages>
<NextPage>Next Page</NextPage>
<ZoomIn>Zoom In</ZoomIn>
<ZoomOut>Zoom Out</ZoomOut>
<FitToWidth>Fit To Width</FitToWidth>
<Rotate>Rotate</Rotate>
<ZoomSlider>Zoom Slider</ZoomSlider>
<CurrentZoom>Current Zoom</CurrentZoom>
<TextToSearch>Text to search</TextToSearch>
<StartSearch>Search / Next result</StartSearch>
<SearchResults>Search Results</SearchResults>
<PreviousSearchResult>Previous search results</PreviousSearchResult>
<NextSearchResult>Next search result</NextSearchResult>
<CloseSearch>Close search</CloseSearch>
<SelectText>Select text</SelectText>
<PrintDocument>Print document</PrintDocument>
<FullScreen>Go fullscreen</FullScreen>
<Save>Save</Save>
<ThumbNailView>Thumbnail view</ThumbNailView>
<HighlightColor>Highlight color</HighlightColor>
<CopyText>Copy text</CopyText>
<CustomBtn1></CustomBtn1>
<CustomBtn2></CustomBtn2>
<CustomBtn3></CustomBtn3>
<TranslateText>Translate Text</TranslateText>
<ChangeLanguage>Change Language</ChangeLanguage>
<Close>Close</Close>
<TranslatedFrom>Translated From</TranslatedFrom>
<To>To</To>
<From>From</From>
<TranslatingPleaseWait>Translating, please wait...</TranslatingPleaseWait>
<PrintThisRange>print this range</PrintThisRange>
<PrintAllPages>print all pages</PrintAllPages>
<PrintCurrentPage>print current page</PrintCurrentPage>
<RangeDescription>Enter a single page, or a range of pages. Examples: 5-12 or 5 or 
3,2,5</RangeDescription>
<CancelPrinting>cancel printing</CancelPrinting>
<TranslationSettings>Translation Settings</TranslationSettings>
<FullScreenSearchWarning>Please perform search outside of full screen 
mode.</FullScreenSearchWarning>
38
<AnnotationSaveSuccessMsg>Annotations saved!</AnnotationSaveSuccessMsg>
<AnnotationErrorGettingFiles>Error getting annotation files from server :</AnnotationErrorGettingFiles>
<AnnotationErrorSavingFiles>Error saving annotations to server :</AnnotationErrorSavingFiles>
<AnnotationErrorGettingAnnotations>Error getting annotations from server 
:</AnnotationErrorGettingAnnotations>
<AnnotationsClickFileToOpen>Click on file to open...</AnnotationsClickFileToOpen>
<Cancel>Cancel</Cancel>
<SaveBtn>Save</SaveBtn>
<AnnotationsSave>Save annotations</AnnotationsSave>
<AnnotationsFileName>Markup name :</AnnotationsFileName>
<AnnotationSaveToDesktop>Save document to your desktop</AnnotationSaveToDesktop>
<AnnotationSaveAnnotations>Save Annotations</AnnotationSaveAnnotations>
<AnnotationSaveCancel>Cancel</AnnotationSaveCancel>
<StampSelectText>Select stamp text :</StampSelectText>
<StampNewStamp>(new stamp text)</StampNewStamp>
<AnnotationRichTextDone>Done</AnnotationRichTextDone>
<HighlightRemoveTag>Remove Tag</HighlightRemoveTag>
<HighlightRemoveHighlight>Remove Highlight</HighlightRemoveHighlight>
<HighlightCancel>Cancel</HighlightCancel>
<HighlightProperties>Properties</HighlightProperties>
<AnnotationRemoveHighlight>Remove Highlight</AnnotationRemoveHighlight>
<PreFilledSearchText>Search...</PreFilledSearchText>
<TabHome>Home</TabHome>
<TabHomeCategoryFile>File</TabHomeCategoryFile>
<TabHomeCategoryZoom>Zoom</TabHomeCategoryZoom>
<TabHomeCategoryNavigate>Navigate</TabHomeCategoryNavigate>
<TabHomeCategoryClipboard>Clipboard</TabHomeCategoryClipboard>
<TabHomeCategoryFullscreen>Fullscreen</TabHomeCategoryFullscreen>
<TabView>View</TabView>
<TabViewCategoryDocumentViews>Document Views</TabViewCategoryDocumentViews>
<TabSearch>Search</TabSearch>
<TabSearchCategorySearch>Search</TabSearchCategorySearch>
<TabTranslate>Translate</TabTranslate>
<TabTranslateCategoryTranslate>Translate</TabTranslateCategoryTranslate>
<TabReview>Review</TabReview>
<TabReviewCategoryFile>File</TabReviewCategoryFile>
<TabReviewCategoryShowHide>Delete/Hide</TabReviewCategoryShowHide>
<TabReviewCategoryDraw>Draw</TabReviewCategoryDraw>
<PrintAnnotations>Print annotations?</PrintAnnotations>
<ReviewSelectText>Select text</ReviewSelectText>
<ReviewCircle>Circle</ReviewCircle>
<ReviewCircleFilled>Filled Circle</ReviewCircleFilled>
<ReviewRectangle>Rectangle</ReviewRectangle>
<ReviewRectangleFilled>Filled Rectangle</ReviewRectangleFilled>
<ReviewRectangleTrans>Transparent Rectangle</ReviewRectangleTrans>
<ReviewArrow>Arrow</ReviewArrow>
<ReviewLine>Line</ReviewLine>
<ReviewColor>Color</ReviewColor>
<ReviewToggleOn>Toggle view on</ReviewToggleOn>
<ReviewToggleOff>Toggle view off</ReviewToggleOff>
<ReviewDelete>Delete</ReviewDelete>
<ReviewStamp>Stamp</ReviewStamp>
<ReviewText>Text</ReviewText>
<HighlightRemoveLink>Remove Link</HighlightRemoveLink>
<HighlightOpenLink>Open Link</HighlightOpenLink>
<HighlightRemoveRedaction>Remove Redaction</HighlightRemoveRedaction>
<HighlightLinkInputInstructions>Please input a link location:</HighlightLinkInputInstructions>
<selectAddTag>Add Tag</selectAddTag>
<selectHighlight>Add Highlight</selectHighlight>
<selectLink>Add Link</selectLink>
<selectRedaction>Add Redaction</selectRedaction>
<selectCopyText>Copy Text</selectCopyText>
<selectCancel>Cancel</selectCancel>
<searchNoAdditionalResults>No additional results found.</searchNoAdditionalResults>
<selectAddTag>Add Tag</selectAddTag>
39
<selectHighlight>Add Highlight</selectHighlight>
<selectLink>Add Link</selectLink>
<selectCopyText>Copy Text</selectCopyText>
<selectCancel>Cancel</selectCancel>
<fullscreenNoticeText>You have entered full screen mode. Please note that keyboard controls are not 
available while in this mode.</fullscreenNoticeText>
<fullscreenNoticeSupressCheckbox>Do not show this warning again</fullscreenNoticeSupressCheckbox>
<fullscreenNoticeOKButton>OK</fullscreenNoticeOKButton>
</tooltips>
40
Documents you may be interested
Documents you may be interested