pdf links

PDF Rendering
Convert PDF to Image (.NET)
Convert PDF to image on Android (Xamarin)
Convert PDF to image on iOS (Xamarin)
Convert PDF to image in Windows Store apps (.NET)
Convert PDF to image in Windows Phone apps (.NET)
PDF to image in Universal Windows Store apps (.NET)
Free PDF Viewer control for Windows Forms (.NET)
How to integrate PDF Viewer control in WPF app (.NET)
Creating WPF PDF Viewer supporting bookmarks (.NET)
Cross-platform PDF Viewer using GTK# (MONO)
Silverlight PDF viewer control (Silverlight 5)
Multithreaded PDF rendering (.NET)
Convert pdf to image in Silverlight app (C# sample)
How to set fallback fonts for PDF rendering (C#)
Avoiding the out-of-memory exception on rendering (C#)
PDF viewer single page application (WebAPI, AngularJS)
PDF viewer control for Windows 10 universal applications
Use custom ICC profile for CMYK to RGB conversion
PDF layers - separate images, text, annotations, graphics

PDF Forms Creation PDF Security
Conversion to PDF/A
Other topics
PDF Document Manipulation
PDF Content Generation
Fixed and Flow layout document API (.NET)
Creation of grids and tables in PDF (C# sample)
How to create interactive documents using Actions (C# sample)
Text flow effects in PDF (C# sample)
How to generate ordered and bulleted lists in PDF (C# sample)
Convert HTML to PDF using flow layout API (C# sample)
How to use custom fonts for PDF generation (.NET)
Create document with differently sized pages (C#)
Create PDF documents using MONO (C#/MONO/Windows/OSX)
How to use background images for content elements (C#/PDF Kit/FlowLayout)
Add transparent images to PDF document (C#)
Draw round rect borders in PDF documents(C#)
ICC color profiles and and ICC based colors in PDF (C#)
How to use bidirectional and right to left text in PDF (C#)
Create PDF documents from XML templates (C# sample)
How to resize PDF pages and use custom stamps (C#)
Add header and footer to PDF page (.NET sample)
How to use clipping mask for drawing on PDF page
Fill graphics path with gradient brushes in PDF (Shadings)
Apitron PDF Kit and Rasterizer engine settings
Add layers to PDF page (optional content, C# sample)
How to create free text annotation with custom appearance

PDF Content Extraction
PDF Navigation

PDF to TIFF conversion
Contact us if you have a PDF related question and we'll cover it in our blog.

2013-06-04

Creating cross-platform PDF viewer using GTK#

Hi, having a bit of free time I decided to create a tiny sample that demonstrates how one of our products, the Apitron.PDF.Rasterizer for .NET can be used for cross-platform development.

Make sure you have the right environment set up. To get the sample working on Mac OS I've used Xamarin Studio, while my Windows PC has MS VS, Xamarin Studio and Mono & gtksharp package installed.

STEP I

Download latest component package from http://www.apitron.com/Downloads and unzip it to the desired location.

STEP II

Download the GTKViewer sample project from this location and open it with your IDE.
Add a reference to Apitron.PDF.Rasterizer.dll.

NOTE:
If you are trying it on Windows with Visual Studio I'd suggest to add the following line to your post-build steps(set the option Run the postbuild event: On Successful build):

"C:\Program Files (x86)\Mono-2.10.9\bin\mono.exe" $(TargetFileName)

it runs your app using mono after build, otherwise if you try to run it as usual BadImageFormatException will be thrown.

STEP III

Run the sample and select PDF file for viewing ( click File->Open), use arrows to navigate between pages.

The images below demonstrate the same application running on Mac OS X and Windows.

Mac OS X


Windows

Should you have any questions, please email me or post a comment. This example is quite simple but clearly demonstrates that cross-platform PDF processing is an easy task with right tools in hand.




No comments:

Post a Comment