Foxit pdf SDK for UWP

Our PDF SDK for UWP focuses on helping developers integrate PDF technology easily into their apps. Enjoy the native performance and behaviors of developing a UWP app with complete source code control and a built in PDF viewer. Even developers with limited PDF knowledge can quickly build a professional, customized viewer with only a few lines of code. Our Software Development Kit has all the text processing functionality you need for your next application.

Developing with PDF SDK for UWP

Build UWP apps that can view, create and edit PDF documents with ease. Our UI Extension provides a fully customizable user interface with built-in tools for text mark-up, drawing, form filling, full-text searching and so much more. Using our Core API your developers can code with our PDF libraries quickly and proficiently, harnessing Foxit’s powerful PDF SDK technology to give your customers a great product. Created with UWP’s fluent design guidelines in mind, our PDF SDK is the perfect companion for any UWP mobile app.

UWP PDF SDK Support

FEATURES

PDF Viewing

Our core API provides for high-fidelity rendering of PDF documents with optimized performance for desktop and mobile platforms.

Digital Signature

Use ink signatures to let customers sign documents in their digital devices. No need to print a file to sign again!

PDF Forms

Give users the ability to fill out digital forms on the go with their device of choice. Apps have never been more productive!

PDF Password Android
Strikeout annotation
Full Text Search

Rights Management

Our PDF SDK can generate secure PDFs with native encryption/decryption or integrate with customized DRM or IRM security systems. Our technology integrates with Microsoft RMS.

PDF Annotations

Our PDF SDK provides full support for annotating and marking up content with an extensive range of functions for creating, editing or importing/exporting annotations.

Full-Text Search

Fast full-text search for any PDF document, language, or encoding type. The SQLite-based full-text search delivers near-instant results, even for repositories on any digital device.

Introducing PDF SDK 6.1 FOR Web 

Foxit PDF SDK for Web 6.1 introduces a number of UI-related and Core features taking our full-JavaScript viewer to the next level with advanced functionality and performance.

ADVANCED TECHNOLOGY

XFA FORMS

XFA Forms are XML-based forms wrapped inside a PDF. Securely capture, present, move, process, output, update and print information associated with static and dynamic XFA forms. Simplify your data sharing, transportation and availability with XFA.

RIGHTS MANAGEMENT

Keep your PDF documents secure by connecting your application and files to Microsoft's Rights Management Services platform natively. Foxit PDF SDK also integrates with your IRM and DRM solution.

OCR

Convert scanned documents to searchable text PDFs with our highly accurate enterprise optical character recognition (OCR) software. Designed for scanning, and archiving, our robust functionality outputs 13 different file formats including PDF & PDF/A.

REDACTION

Programmatically search and sensor sensitive information in a document for legal or security purposes to keep your customer and employee information safe.XFA.
Achieve full GDPR-compliance.

CONNECTED PDF

Leverage Foxit's cutting-edge technology that powers document intelligence, security and collaboration services, programmatically, for PDF files. Secure files, access analytics, and collaborate in real time, all within one SDK.

CONVERSION

Leverage our conversion and compression technology to speed up file conversion and archiving. Convert TIFF, JPEG, Word, Email, HTML, ASCII text and more to file formats including PDF and PDF/A.

XFA FORMS

XFA Forms are XML-based forms wrapped inside a PDF. Securely capture, present, move, process, output, update and print information associated with static and dynamic XFA forms. Simplify your data sharing, transportation and availability with XFA.

Rights Management

Keep your PDF documents secure by connecting your application and files to Microsoft’s Rights Management Services platform natively. Foxit PDF SDK also integrates with your IRM and DRM solution.

OCR

Convert scanned documents to searchable text PDFs with our highly accurate enterprise optical character recognition (OCR) software. Designed for scanning, and archiving, our robust functionality outputs 13 different file formats including PDF & PDF/A.

REDACTION

Programmatically search and sensor sensitive information in a document for legal or security purposes to keep your customer and employee information safe. Achieve full GDPR-compliance.

CONNECTEDPDF

Leverage Foxit's cutting-edge technology that powers document intelligence, security and collaboration services, programmatically, for PDF files. Secure files, access analytics, and collaborate in real time, all within one SDK.

CONVERSION

Leverage our conversion and compression technology to speed up file conversion and archiving. Convert TIFF, JPEG, Word, Email, HTML, ASCII text and more to file formats including PDF and PDF/A.

Try our Technology

Our UWP PDF Reader is built with our PDF SDK for UWP and free to download from the Microsoft Store. Try our technology today.

Benefits

Native UI

Our UWP PDF SDK is built with developers in mind. We provide a built in PDF viewer which will half your development time while allowing you to customize your viewer to your business needs.

Easy to Integrate

We designed our UWP PDF Library with platform considerations a priority. This means that we follow UWP specific naming conventions and fluent design principles to make our product native to it.

Feature Rich

Our feature set is consistent across mobile and desktop platforms to make cross platform developer linear and easy. We are always updating our feature set, so keep an eye on our product page for announcements.

Powered by Foxit's Core Technology

The core technology of Foxit PDF SDK has been around for years and is trusted by a large number of well-known companies, so you can trust Foxit’s powerful engine to make PDF viewing fast and consistent everywhere.

SYSTEM REQUIREMENTS

 

  • Windows 10
  • Visual Studio 2015 or later

Foxit PDF SDK for uwp in action

//Edit the bookmarks title, color, style... then save them to a new pdf.
void FunctionDemo::MainPage::outline_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
	StorageFolder^ documentFolder = Windows::Storage::KnownFolders::DocumentsLibrary;
	create_task(documentFolder->GetFileAsync("Outline.pdf")).then([=](StorageFile^ file) {
		try
		{
			m_doc = ref new FSPDFDoc(file,0);
			if (!m_doc)
			{
				return;
			}
			FSErrorCode code = m_doc->Load("");
			if (code != FSErrorCode::e_errSuccess) {
				return;
			}

			FSBookmark^ root = m_doc->GetFirstBookmark();
			this->setProperties(root);
		}
		catch (Platform::Exception^ e)
		{
			OutputDebugString(e->Message->Data());
		}
	}).then([=]()
	{
		return documentFolder->CreateFileAsync("Output_Outline.pdf", CreationCollisionOption::ReplaceExisting);
	}).then([=](StorageFile^ file)
	{
		try
		{
			m_doc->SaveAs(file, 0);
			this->showMesseageDialog("", "The output file is saved to:" + file->Path);
		}
		catch (Platform::Exception^ e)
		{
		}
	});
}


void FunctionDemo::MainPage::setProperties(FSBookmark^ bookmark)
{
	FSBookmark^ bm = nullptr;
	for (bm = bookmark->GetFirstChild(); bm != nullptr; bm = bm->GetNextSibling())
	{
		String^ title = bm->GetTitle();
		bm->SetTitle(title + "_renamed");
		bm->SetColor(0x0000ffff);
		bm->SetStyle((int)FSBookmarkStyle::e_bookmarkStyleBold);

		FSBookmark^ child = bm->GetFirstChild();
		if (child)
		{
			this->setProperties(bm);
		}
	}
}

void FunctionDemo::MainPage::showMesseageDialog(Platform::String^ title, Platform::String^ content)
{
	auto messageDialog = ref new Windows::UI::Popups::MessageDialog(content, title);
	messageDialog->Commands->Append(ref new Windows::UI::Popups::UICommand("OK", nullptr, PropertyValue::CreateInt32(0)));
	messageDialog->DefaultCommandIndex = 0;
	messageDialog->ShowAsync();
}
//Render the pdf page, then save it to a bitmap file.
void FunctionDemo::MainPage::render_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
	StorageFolder^ documentFolder = Windows::Storage::KnownFolders::DocumentsLibrary;
	std::shared_ptr<fsbitmap^> spBitmap = std::make_shared<fsbitmap^>(nullptr);
	create_task(documentFolder->GetFileAsync("FoxitBigPreview.pdf")).then([=](StorageFile^ file) {
		try
		{
			m_doc = ref new FSPDFDoc(file, 0);
			if (!m_doc)
			{
				return;
			}
			
			FSErrorCode code = m_doc->Load("");
			if (code != FSErrorCode::e_errSuccess) {
				return;
			}

			FSPDFPage^ page = m_doc->GetPage(0);
			if (!page->IsParsed())
			{
				page->StartParse(0, nullptr, false);
			}
			//create bitmap
			int pageWidth = (int)page->GetWidth();
			int pageHeight = (int)page->GetHeight();
			*spBitmap = ref new FSBitmap(pageWidth, pageHeight, FSDIBFormat::e_dibRgb32, nullptr, 0);
			if (!(*spBitmap)) {
				return;
			}
			(*spBitmap)->FillRect(0xffffffff, nullptr);

			//init renderer
			FSRenderer^ render = ref new FSRenderer((*spBitmap), false);
			if (!render) {
				return;
			}

			//set different kinds of properties
			render->SetRenderContentFlags((int)FSRenderContentFlag::e_renderPage);
			render->SetTransformAnnotIcon(true);
			render->SetColorMode(FSRenderColorMode::e_colorModeNormal);
			render->SetForceHalftone(true);

			FSMatrix^ matrix = page->GetDisplayMatrix(0, 0, pageWidth, pageHeight, FSRotation::e_rotation0);
			render->StartRender(page, matrix, nullptr);

		}
		catch (Platform::Exception^ e)
		{
			OutputDebugString(e->Message->Data());
		}
	}).then([=]()
	{
		return documentFolder->CreateFileAsync("Output_Render.bmp", CreationCollisionOption::ReplaceExisting);
	}).then([=](StorageFile^ file)
	{
		FSImage^ img = ref new FSImage();
		img->AddFrame((*spBitmap));
		if(img->SaveAs(file, "bmp"))
			this->showMesseageDialog("", "The output file is saved to:" + file->Path);
		else
			this->showMesseageDialog("", "error!");
	});
	
}