All Projects → cube-soft → Cube.pdf

cube-soft / Cube.pdf

Licence: other
CubePDF series and their library codes. The project is based on PDFium, iTextSharp, and Ghostscript (net35, net45).

Labels

Projects that are alternatives of or similar to Cube.pdf

Pyreportjasper
Python Reporting with JasperReports
Stars: ✭ 77 (-10.47%)
Mutual labels:  pdf
Sentinl
Kibana Alert & Report App for Elasticsearch
Stars: ✭ 1,233 (+1333.72%)
Mutual labels:  pdf
Dicom Ecg Plot
Dicom ECG Viewer and Converter. Convert to PDF, PNG, JPG, SVG, ...
Stars: ✭ 84 (-2.33%)
Mutual labels:  pdf
Cheatsheets
JavaScript and Node.js cheatsheets
Stars: ✭ 1,191 (+1284.88%)
Mutual labels:  pdf
Gotenberg Php Client
PHP client for the Gotenberg API
Stars: ✭ 80 (-6.98%)
Mutual labels:  pdf
Puppeteer Pdf
PDF generation wrapper for Elixir using Puppeteer
Stars: ✭ 82 (-4.65%)
Mutual labels:  pdf
Pyhanko
pyHanko: sign and stamp PDF files
Stars: ✭ 77 (-10.47%)
Mutual labels:  pdf
Kotlin Reference Chinese
Kotlin 官方文档(参考部分)中文版
Stars: ✭ 85 (-1.16%)
Mutual labels:  pdf
Flutter plugin pdf viewer
A flutter plugin for handling PDF files. Works on both Android & iOS
Stars: ✭ 81 (-5.81%)
Mutual labels:  pdf
React Pdf
📄 Create PDF files using React
Stars: ✭ 10,153 (+11705.81%)
Mutual labels:  pdf
Laravel Pdf
A Simple package for easily generating PDF documents from HTML. This package is specially for laravel but you can use this without laravel.
Stars: ✭ 79 (-8.14%)
Mutual labels:  pdf
Jfbview
PDF and image viewer for the Linux framebuffer.
Stars: ✭ 78 (-9.3%)
Mutual labels:  pdf
Fe Necessary Book
A book and software collection about frontend
Stars: ✭ 1,239 (+1340.7%)
Mutual labels:  pdf
Pandoc Letter Din5008
Pandoc template for writing Markdown letters (DIN 5008)
Stars: ✭ 77 (-10.47%)
Mutual labels:  pdf
Graphicsrenderer
A drop-in UIGraphicsRenderer port -- CrossPlatform, Swift 4, Image & PDF
Stars: ✭ 85 (-1.16%)
Mutual labels:  pdf
Markdownmonster
An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
Stars: ✭ 1,203 (+1298.84%)
Mutual labels:  pdf
Word2pdf Tools
📝通过LibreOffice / WPS / Microsoft Office / 第三方库 实现多种word转pdf格式的方案
Stars: ✭ 82 (-4.65%)
Mutual labels:  pdf
Pdfreport
PdfReport is a code first reporting engine, which is built on top of the iTextSharp and EPPlus libraries.
Stars: ✭ 85 (-1.16%)
Mutual labels:  pdf
Promises Book
JavaScript Promiseの本
Stars: ✭ 1,264 (+1369.77%)
Mutual labels:  pdf
Koreader Base
Base framework offering a Lua scriptable environment for creating document readers
Stars: ✭ 81 (-5.81%)
Mutual labels:  pdf

Cube.Pdf

NuGet NuGet NuGet NuGet NuGet
NuGet NuGet NuGet
AppVeyor Codecov

Cube.Pdf libraries wrap PDFium, Ghostscript, iText, and other third-party PDF libraries. The repository also has some PDF applications, such as CubePDF, CubePDF Utility, CubePDF Page, and more. Libraries and applications are available for .NET Framework 3.5, 4.5, or later. Note that some projects are licensed under the GNU AGPLv3 and the others under the Apache 2.0. See License.md for more information.

Libraries

Cube.Pdf and related libraries

You can install Cube.Pdf libraries through the NuGet package commands or UI on Visual Studio. The Libraries provide the functionality to treat third-party libraries as the same interface (except for the Cube.Pdf.Ghostscript). Basic interfaces of the Cube.Pdf are as follows:

For example, the following sample accesses a PDF document by using the iTextSharp library. And when you want to use the PDFium library, you only modify the description of "using Cube.Pdf.Itext" to "using Cube.Pdf.Pdfium".

// using Cube.Pdf.Itext;

// Set password directly or using Query<string>
var password = new Cube.Query<string>(e =>
{
    e.Value  = "password", // Source path is set in the e.Source property.
    e.Cancel = false,
});

using (var reader = new DocumentReader(@"path/to/sample.pdf", password))
{
    // Do something with Pages, Metadata, Encryption, and more properties.
}

When you merge, extract, or remove existing PDF pages, the simplest code is as follow. Note that if you specify an IDocumentReader object to the Add method of an IDocumentWriter implementation class, the IDocumentWriter object automatically disposes the specified object before saving.

// using Cube.Pdf.Itext;

using (var writer = new DocumentWriter())
{
    var src0 = new DocumentReader("first.pdf", "password");
    var src1 = new DocumentReader("second.pdf", "password");

    writer.Add(src0.Pages[0], src0);
    writer.Add(src1.Pages[0], src1);

    // Disposes src0 and src1 before saving.
    writer.Save(@"path/to/dest.pdf");
}

Cube.Pdf.Ghostscript

When you convert from PostScript to any other formats, you can use the Cube.Pdf.Ghostscript library. The following code converts to the PDF file.

// using Cube.Pdf;
// using Cube.Pdf.Ghostscript;

var converter = new PdfConverter
{
    Paper        = Paper.Auto,
    Orientation  = Orientation.Auto,
    ColorMode    = ColorMode.Rgb,
    Resolution   = 600,
    Compression  = Encoding.Jpeg,
    Downsampling = Downsampling.None,
    Version      = new PdfVersion(1, 7),
};
converter.Invoke(@"path\to\src.ps", @"path\to\dest.pdf");

See the Readme in the Ghostscript directory for details.

Applications

CubePDF

Screenshot

CubePDF is a PDF converter which allows you to convert files from any applications (for example, Google Chrome, Firefox, Microsoft Edge, Microsoft Word, Excel, PowerPoint, and more), whenever you need it. The converter allows you to convert the files as easy as you can print the files; as a matter of fact, you can do it in the same manner as you print files. The application uses Ghostscript and iTextSharp.

You can get the executable installer from the download page or GitHub Releases. Source codes of the CubePDF are in the Applications/Converter (except for the virtual printer).

CubePDF Utility

Screenshot

CubePDF Utility is a PDF editor which can insert, remove, move, rotate pages, add or modify some metadata (PDF version, title, author, subject, keywords, creator, page layout), and encryption settings GUI. The application uses PDFium and iTextSharp.

You can get the executable installer from the download page (Japanese) or GitHub Releases. Source codes of the CubePDF Utility are in the Applications/Editor.

Dependencies

Dependencies of Libraries are as follows. Applications may use some other third-party libraries.

Contributing

  1. Fork Cube.Pdf repository.
  2. Create a feature branch from the master or stable branch (e.g. git checkout -b my-new-feature origin/master). Note that the master branch may refer to some pre-release NuGet packages. Try the rake clobber and copy commands when build errors occur.
  3. Commit your changes.
  4. Rebase your local changes against the master or stable branch.
  5. Run test suite with the NUnit console or the Visual Studio (NUnit 3 test adapter) and confirm that it passes.
  6. Create a new Pull Request.

License

Copyright © 2010 CubeSoft, Inc. See License.md for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].