Spire.PDF for Java
Java PDF Library - Developing PDF in JavaJava PDF Library – Create Read Modify Print Convert PDF Documents in Java
- Overview
- Features
- Support
- What's New
- Live Demo
Spire.PDF for Java is a PDF API that enables Java applications to read, write and save PDF documents without using Adobe Acrobat. Using this Java PDF component, developers and programmers can implement rich capabilities to create PDF files from scratch or process existing PDF documents entirely on Java applications (J2SE and J2EE).
Many rich features can be supported by Spire.PDF for Java, such as security settings, extracting text/images, merging/spliting PDF, drawing text/image/shape/barcode to the PDF, create/filling in form fields, adding/deleting layers, overlaying PDF, inserting text/image watermark, adding/updating/deleting bookmarks, adding tables, adding annotations, and compressing PDF document etc.
Spire.PDF for Java can be applied easily converting PDF to Word Doc/Docx, Excel, PowerPoint, HTML, images (TIFF, JPEG, PNG), XPS, SVG, PostScript and PDF/A etc. It also supports to convert HTML, images, Text, TIFF, XPS and SVG to PDF in high quality.
-
Convert
-
Compress
-
Extract
-
Protect
-
eSign
-
Form
-
Watermark
-
Merge & Split
-
Layer
-
Adjust
Convert PDF to Word
PDF is considered an ideal file format for document sharing and printing, but it is difficult to edit. If you want to modify the text in a PDF file, you can convert it to Word.
Compress PDF
Compressing PDFs can reduce their size by 10 to 100 times, thus saving you a lot of storage space and making PDF documents easier to transfer over the Internet.
Extract Text and Images
When you just need to get the information in a PDF document regardless of its format and structure, you can simply extract the text and images from the document.
PDF Encryption
PDF encryption is a crucial task when it comes to sharing confidential documents on the Internet. Using Spire.PDF, you can set a password to restrict access to your PDF file, or set permissions to define what actions users can perform on the document.
Digitally Sign PDF
A digital signature provides assurances about the validity and authenticity of your PDF documents. Once a PDF document is digitally signed, any changes to the document will invalidate the signature.
Create a Form
Form fields make it easier to collect information. Users can enter information by choosing an item from a drop-down list, inserting text in a combo box, or checking a check box.
Add a Watermark to PDF
Watermarks in PDFs serve many important purposes, such as identifying the document's owner, indicating its status and preventing unauthorized copying and distribution.
Merge and Split PDF
Sometimes, you might need to merge multiple PDF files into one in order to store and review them easier. Likewise, you may also want to split a PDF file into individual files and share them with others separately.
Add Layers to PDF
PDF layer is an interactive feature for PDF documents that allows some part of the content to be made visible or hidden. Layers are used for items such as CAD drawings, layered artwork, maps, and multi-language documents.
Change PDF Page Size
By adjusting the page size of a PDF document, you can easily get a better document appearance or make the page size match the printing paper.
JAVA
A totally independent Java PDF library.
It does not require Adobe
Acrobat or any other 3rd party software/library installed on system.
VERSION
- PDF 1.2 to PDF 1.7
- PDF/A - 1b
- PDF/x1a
- PDF/A1
- PDF/A2
- PDF/A3
- PDF/UA
FONT
- 14 Core Fonts
- Type 1 Fonts
- Type 3 Fonts
- CJK Fonts
- True Type Fonts
- Unicode Support
OPERATION
Powerful Toolset, Multichannel Support
-
Create, get and verify, remove digital signature
-
Encrypt and Decrypt PDF file
-
Image and Shape
-
Create & Fill Form Field
-
Merge and Split PDF document
-
Manage attachment
-
Manage bookmark
-
Manage annotation
-
Text & image watermark
-
Find & Highlight
-
Insert Hyperlink
-
Compress PDF
-
Extract text and image
-
Header and Footer
-
Create & Format Table
-
Print PDF file
-
Tagged PDF
CONVERSION
Convert File Documents with High Quality
-
SVG
-
TXT
-
XPS
-
HTML
-
Image
-
PPTX
-
Excel
-
Word
-
PCL
-
PDF/A
-
PNG
-
BMP
-
JPEG
-
EMF
-
TIFF
MAIN FUNCTION
Only Spire.PDF for Java,
No Adobe Acrobat Installed
Easily Manipulate
Document and Form Fields
Document Settings Features
Document information can be set with Spire.PDF for Java including document properties, viewer preference such as zoom factor, count the number of pages, change page size, get page size, orientation and rotation of PDF.Security Features
Spire.PDF for Java supports to add or delete digital signatures and verify or extract digital signatures on the PDF documents, encrypt and decrypt the PDF document, add PDF security permission and detect whether a signed PDF is changed or not.Easy Integration
Spire.PDF for Java can be easily integrated into Java applications (J2SE and J2EE).Commercial Edition $999
Compared with the Free Spire.PDF for Java, the commerical edition of Spire.PDF for Java supports many more features while operating the PDF documents, such as extracting image from PDF, converting PDF to SVG, and converting XPS to PDF.
Free Edition $0
Free Spire.PDF for Java is a 100% free PDF API that enables Java applications to read, write and save PDF documents without using Adobe Acrobat.
GET STARTED
Free Trials for All Progress Solutions
Here is a brief summary of Spire.PDF for Java features.
Support Environment
- 100% Written in Java
- Supports 32-bit and 64-bit OS
- Works on Windows, Linux, Unix and Mac OS
- Supports PDF Version 1.2, 1.3, 1.4, 1.5, 1.6 and 1.7
- No Need to Install Additional Software
Conversion
- Convert PDF to PDF/A
- Convert PDF to Image
- Convert PDF to SVG
- Convert SVG to PDF
- Convert PDF to XPS
- Convert XPS to PDF
- Convert PDF to Word
- Convert PDF to HTML
- Convert PDF to Excel
Security
- Encrypt PDF
- Decrypt PDF
- Create PDF Digital Signature
- Change Security Permission
- Detect Whether a Signed PDF was Modified or Not
Text
- Draw Text
- Set Text Format(Font, Size, Color, Layout, Rotate, Transform, Alignment)
- Read/Extract Text
Fonts
- True Type Fonts
- CJK Fonts
- Unicode Support (Partial)
Images
- Draw Image
- Draw Special Shapes(lines, Rectangles, Circles, Arcs, Ellipses, Five-Pointed Star)
- Draw PDF Barcode
- Read/Extract Images
Attachments
Tables
- Simple Table
- Image Table
- Export Datatable to PDF
- Set Table Layout
- Format Table Bordor
Bookmarks
List
- Simple List
- Ordered List
- Multiple levels List
Header and Footer
- Add Text in Header and Footer
- Add Image in Header and Footer
Watermark
Actions
- Add Action
- Add Javascript Action
- Add Action Chain
FormField
- Add Fields(Text Box, Check Box, List box, Combo Box, Button, Radio Button)
- Remove Fields
- Fill Fields
Pages
- Add PDF Pages
- Delete PDF Pages
- Set Page Number
- Get Page Count
- Paginate Pages
- Set Page Transition
- Set Page Orientation
- Set Page Transparency
- Set Page Overlay
Document
We guarantee one business day Forum questions Reply. |
We guarantee one business day E-mail response. |
Free Customized service for OEM Users. |
|||||||||||
Skype name: iceblue.support |
Apply for a Free Trial License File. |
||||||||||||
This is the list of changelogs of Spire.PDF for Java New release and hotfix. You can get the detail information of each version's new features and bug solutions.
Version: 10.10.7
Category | ID | Description |
New feature | SPIREPDF-7120 | Synchronizes the ToPdfX1A2001() method under the PdfStandardsConverter class to Java. |
New feature | SPIREPDF-6972 | Supports converting HTML to PDF using the Chrome plugin. Supported systems: Windows & Linux.
ChromeHtmlConverter converter = new ChromeHtmlConverter(TestUtil.ChromiumPath); URI uri = new URI(converter.getUrl()); IWebSocketService webSocketService = (IWebSocketService) WebSocketServiceImpl.create(uri); converter.setWebSocketService(webSocketService); ConvertOptions options = new ConvertOptions(); options.setTimeout(10 * 1000); PageSettings pageSettings = new PageSettings(); pageSettings.setPaperFormat(8);//A4 pageSettings.setMarginBottom(0); pageSettings.setMarginTop(0); pageSettings.setMarginLeft(0); pageSettings.setMarginRight(0); options.setPageSettings(pageSettings); converter.convertToPdf(inputPath, OutputPath, options); |
New feature | SPIREPDF-7094 | Supports output of logs through the Logger class when using the Chrome plugin to convert HTML to PDF.
ChromeHtmlConverter converter = new ChromeHtmlConverter(TestUtil.ChromiumPath); converter.setLogger(new Logger(OutputPath_TXT)); // Save logs to a txt file converter.getLogger().setEnabled(true); // Print logs to the console |
Bug | SPIREPDF-6958 | Fixes the issue that the effect of converting HTML to PDF was incorrect. |
Bug | SPIREPDF-7064 | Fixes the issue that the program threw "Value cannot be null" exception when merging documents. |
Bug | SPIREPDF-7087 | Fixes the issue that it failed to convert HTML to PDF over 1.2MB in size. |
Bug | SPIREPDF-7089 | Fixes the issue that the text of tables was messed up after converting PDF to images. |
Bug | SPIREPDF-7090 | Fixes the issue that the contents were cut off from the page breaks when converting HTML to PDF. |
Bug | SPIREPDF-7091 | Fixes the issue that the program hung when converting HTML to PDF. |
Bug | SPIREPDF-7113 | Fixes the issue that the tool alerted that there were errors in the document content after drawing SVG on PDF layers and opening the resulting document in Adobe tools. |
Bug | SPIREPDF-7127 | Fixes the issue that the program threw an exception of "Unknown Color Space Type" when converting OFD to PDF. |
Bug | SPIREPDF-7128 | Fixes the issue that setting the customized properties of attachments did not take effect. |
Bug | SPIREPDF-7130 | Fixes the issue that the program threw "For input string: 'CM'" exception when converting OFD to PDF. |
Version: 10.10.0
Category | ID | Description |
New feature | SPIREPDF-7017 | Supports returning error document information when merging documents reports errors. |
Bug | SPIREPDF-7029 | Fixes the issue that the red seal became black after encrypting PDF documents. |
Bug | SPIREPDF-7033 | Fixes the issue that the program threw "Unknown Target Area Type: Fit_H" exception when converting PDF to OFD. |
Version: 10.9.0
Category | ID | Description |
New feature | SPIREPDF-6920 | Adds the PreserveAllowedMetadata property to support preserving XMP data when converting PDF to PDF/A format documents.
PdfStandardsConverter convert= new PdfStandardsConverter(outputFile_pdf); convert.getOptions().setPreserveAllowedMetadata(true); convert.toPdfA2A(outputFile_pdfA2A); |
New feature | SPIREPDF-6977 | Add a new interface 'PdfTextReplaceOptions.setReplacementArea(Rectangle2D rect)' to support extracting text from specified areas.
PdfPageBase page = pdf.getPages().get(0); PdfTextReplacer replacer= new PdfTextReplacer (page); replacer.getOptions().setReplacementArea(new Rectangle2D.Float(10, 0, 841, 150)); replacer.getOptions().setReplaceType(EnumSet.of(ReplaceActionType.WholeWord)); replacer.replaceAllText("SQL","Now SQL"); |
New feature | SPIREPDF-6962 | Adds a deprecation status indicator to the 'PdfDocument.isPasswordProtected(filename)' method. |
Bug | SPIREPDF-6959 | Fixes the issue that the program threw a 'java.lang.NullPointerException' when replacing text. |
Bug | SPIREPDF-6973 | Fixes the issue that the program threw a 'java.lang.NullPointerException' when extracting text. |
Bug | SPIREPDF-6976 | Fixes the issue that the program threw a 'java.lang.ArrayIndexOutOfBoundsException' when extracting text. |
Bug | SPIREPDF-6992 | Fixes the issue that the program threw a 'java.lang.OutOfMemoryError' when determining if a PDF document was password protected. |
Bug | SPIREPDF-6994 | Fixes the issue that the program threw a 'java.lang.NoClassDefFoundError' when compressing images. |
Bug | SPIREPDF-7001 | Fixes the issue that the program threw a 'java.lang.OutOfMemoryError' when merging documents after replacing text. |
Version: 10.8.1
Category | ID | Description |
Bug | SPIREPDF-6851 | Fixes the issue that the program threw "NullPointerException" when converting PDF to SVG. |
Bug | SPIREPDF-6881 | Fixes the issue that some punctuation marks were missing when extracting table text. |
Bug | SPIREPDF-6895 | Fixes the issue that the content was lost when converting OFD to PDF. |
Bug | SPIREPDF-6923 | Fixes the issue that the program threw "doc-0/res/doc-0/res/res7651308984730378845.png cannot be found!" when converting OFD to PDF. |
Bug | SPIREPDF-6924 | Fixes the issue that the program threw "ArrangStoreException" while reading Tiff files. |
Bug | SPIREPDF-6939 | Fixes the issue that the program threw "NullPointerException" when converting PDF to Word. |
Bug | SPIREPDF-6947 | Fixes the issue that the font styles were incorrect when converting PDF to PPTX. |
Version: 10.7.3
Category | ID | Description |
Bug | SPIREPDF-6804 | Fixes the error occurred when opening compressed PDF files. |
Bug | SPIREPDF-6831 | Fixed the issue that the effect of the PdfInkAnnotation added to PDF was incorrect. |
Bug | SPIREPDF-6856 | Fixes the issue that the program threw "NullPointerException" when obtaining the PDF JavaScript. |
Bug | SPIREPDF-6865 | Fixes the issue that the program threw "java.lang.NoClassDefFoundError" when compressing images with the "ImageQuality.Medium" setting. |
Bug | SPIREPDF-6870 | Fixed the issue that the size of PDF documents was not reduced after splitting. |
Bug | SPIREPDF-6879 | Fixes the issue of creating a PdfActionAnnotation but retrieving its type as PdfTextWebLinkAnnotationWidget. |
Bug | SPIREPDF-6886 | Fixes the issue that the program threw "NullPointerException" when replacing text in PDF. |
Version: 10.6.2
Category | ID | Description |
Bug | SPIREPDF-6767 | Fixes the issue that an error "StringIndexOutOfBoundsException" was thrown when extracting PDF tables. |
Bug | SPIREPDF-6781 | Fixes the issue that text was overlapped after converting PDF to images. |
Bug | SPIREPDF-6796 | Fixes the issue that an error "Width (48) and height (0) must be > 0" was thrown when compressing PDF. |
Bug | SPIREPDF-6810 | Fixes the issue that bookmarks were lost after converting PDF to OPD. |
Bug | SPIREPDF-6821 | Fixes the issue that content was lost when converting SVG to PDF. |
Version: 10.6.0
Category | ID | Description |
Bug | SPIREPDF-6601 | Optimizes the issue of font naming when converting PDF to SVG. |
Bug | SPIREPDF-6628 | Fixes the issue that the application threw an exception when converting PDF to Word. |
Bug | SPIREPDF-6676 | Optimizes the time-consuming for merging PDF files. |
Bug | SPIREPDF-6705 | Fixes the issue that the PdfInkAnnotation added to PDF was lost after conversion to OFD. |
Bug | SPIREPDF-6709 | Fixes the issue that the PdfInkAnnotation added to PDF was not rendered incorrectly. |
Bug | SPIREPDF-6747 | Fixes the issue that the PdfTextExtractOptions.setExtractHiddenText(false) method didn’t take effect. |
Version: 10.4.9
Category | ID | Description |
New feature | SPIREPDF-6644 | Adds a constructor method "PdfInkAnnotation ink = new PdfInkAnnotation(Rectangle2D rect, ListPdfDocument doc = new PdfDocument(); PdfPageBase pdfPage = doc.getPages().add(); ArrayList inkList = new ArrayList(); int[] intPoints = new int[] { 100,800, 200,800, 200,700 }; inkList.add(intPoints); Rectangle2D rect = new Rectangle2D.Float(); rect.setFrame(new Point2D.Float(0, 0), new Dimension((int)pdfPage.getActualSize().getWidth(), (int)pdfPage.getActualSize().getHeight())); PdfInkAnnotation ink= new PdfInkAnnotation(rect,inkList); ink.setColor(new PdfRGBColor(Color.RED)); ink.getBorder().setWidth(12); ink.setText("e-iceblue"); pdfPage.getAnnotations().add(ink); doc.saveToFile("inkAnnotation.pdf"); |
New feature | SPIREPDF-6672 | Supports retrieving Javascript content from PDF documents.
PdfPageBase page = pdf.getPages().get(0); StringBuilder stringBuilder = new StringBuilder(); java.util.List |
Bug | SPIREPDF-6662 SPIREPDF-6667 |
Fixes the issue that the text in tables was not being extracted completely. |
Bug | SPIREPDF-6675 | Fixes the issue that the application threw a "java.lang.NullPointerException" exception when saving a PDF document after flattening form fields. |
Version: 10.4.4
Category | ID | Description |
New feature | SPIREPDF-6243 SPIREPDF-6638 |
Supports getting the keyword font names and sizes.
PdfDocument pdf = new PdfDocument(); pdf.loadFromFile(inputFile); PdfPageBase page = pdf.getPages().get(0); PdfTextFinder finds = new PdfTextFinder(page); finds.getOptions().setTextFindParameter(EnumSet.of(TextFindParameter.IgnoreCase)); List |
New feature | SPIREPDF-6560 | The PdfTextReplacer class supports matching through regular expressions.
PdfDocument doc = new PdfDocument(); doc.loadFromFile("input.pdf"); PdfTextReplaceOptions textReplaceOptions = new PdfTextReplaceOptions(); textReplaceOptions.setReplaceType(EnumSet.of(ReplaceActionType.Regex)); PdfPageBase page = doc.getPages().get(0); PdfTextReplacer textReplacer = new PdfTextReplacer(page); textReplacer.setOptions(textReplaceOptions); String regularExpression = "\\bS\\w*L\\b"; textReplacer.replaceAllText(regularExpression, "NEW"); doc.saveToFile("output.pdf"); doc.dispose(); |
Bug | SPIREPDF-6330 | Fixes the issue that the converted PDFA2B file did not pass validation. |
Version: 10.3.4
Category | ID | Description |
New feature | SPIREPDF-4354 | Adds the PdfTextReplacer class to replace PDF text.
PdfDocument doc = new PdfDocument(); doc.loadFromFile("Input.pdf"); PdfPageBase page = doc.getPages().get(0); PdfTextReplacer textReplacer = new PdfTextReplacer(page); textReplacer.replaceAllText("old", "NEW"); doc.saveToFile("output.pdf"); doc.dispose(); |
New feature | SPIREPDF-6591 | Supports adding InkAnnotation to PDF.
PdfDocument doc = new PdfDocument(); PdfPageBase pdfPage = doc.getPages().add(); List |
Bug | SPIREPDF-6606 | Optimizes the PDF signature time to match the system local time. |
Request free customized demo just for you. |
Tab 1
Upload
Convert to
Tab 2
Upload
Convert to
Tab 3
Data
Contact | Company | City | Country | Phone |
Erica Norman | Kauai Dive Shoppe | Kapaa Kauai | US | 808-555-0269 |
George Weathers | Unisco | Freeport | Bahamas | 809-555-3915 |
Phyllis Spooner | Sight Diver | Kato Paphos | Cyprus | 357-6-876708 |
Joe Bailey | Cayman Divers World Unlimited | Grand Cayman | British West Indies | 011-5-697044 |
Chris Thomas | Tom Sawyer Diving Centre | Christiansted | US Virgin Islands | 504-798-3022 |
Ernest Barratt | Blue Jack Aqua Center | Waipahu | US | 401-609-7623 |
Russell Christopher | VIP Divers Club | Christiansted | US Virgin Islands | 809-453-5976 |
Paul Gardner | Ocean Paradise | Kailua-Kona | US | 808-555-8231 |
Susan Wong | Fantastique Aquatica | Bogota | Columbia | 057-1-773434 |
Joyce Marsh | Marmot Divers Club | Kitchener | Canada | 416-698-0399 |
Sam Witherspoon | The Depth Charge | Marathon | US | 800-555-3798 |
Theresa Kunec | Blue Sports | Giribaldi | US | 610-772-6704 |
Donna Siaus | Makai SCUBA Club | Kailua-Kona | US | 317-649-9098 |
Michael Spurling | Action Club | Sarasota | US | 813-870-0239 |
Barbara Harvey | Jamaica SCUBA Centre | Negril | West Indies | 011-3-697043 |
Desmond Ortega | Island Finders | St Simons Isle | US | 713-423-5675 |
Gloria Gonzales | Adventure Undersea | Belize City | Belize | 011-34-09054 |
Harry Bathbone | Blue Sports Club | Largo | US | 612-897-0342 |
Lloyd Fellows | Frank's Divers Supply | Eugene | US | 503-555-2778 |
Tanya Wagner | Davy Jones' Locker | Vancouver | Canada | 803-509-0112 |
Robert Michelind | SCUBA Heaven | Nassau | Bahamas | 011-32-09485 |
Frank Paniagua | Shangri-La Sports Center | Freeport | Bahamas | 011-32-08574 |
Charles Lopez | Divers of Corfu, Inc. | Ayios Matthaios | Greece | 30-661-88364 |
Rudolph Claus | Kirk Enterprises | Houston | US | 713-556-6437 |
Bill Wyers | George Bean Co. | Lugoff | US | 803-438-2771 |
Shirley Mathers | Professional Divers, Ltd. | Hoover | US | 205-555-8333 |
Nancy Bean | Divers of Blue-green | Pelham | US | 205-555-7184 |
Elaine Falls | Gold Coast Supply | Mobile | US | 205-555-2640 |
Patricia O'Brien | San Pablo Dive Center | Santa Maria | US | 823-044-2910 |
Dave Walling | Underwater Sports Co. | San Jose | US | 408-867-0594 |
Lynn Cinciripini | American SCUBA Supply | Lomita | US | 213-654-0092 |
Nicole Dupont | Catamaran Dive Club | Catalina Island | US | 213-223-0941 |
Peter Owen | Diver's Grotto | Downey | US | 213-432-0093 |
Bethan Lewis | Fisherman's Eye | Grand Cayman | British West Indies | 809-555-4680 |
Marianne Miles | Action Diver Supply | St. Thomas | US Virgin Islands | 22-44-500211 |
Stephen Bryant | Marina SCUBA Center | Caracas | Venezuela | 58-33-66222 |
Christine Taylor | Blue Glass Happiness | Santa Monica | US | 213-555-1984 |
Simone Green | Divers of Venice | Venice | US | 813-443-2356 |
Bram Phillips | On-Target SCUBA | Winnipeg | Canada | 416-445-0988 |
Jonathan West | Jamaica Sun, Inc. | Runaway Bay | West Indies | 809-555-2746 |
Grant Ainsworth | Underwater Fantasy | Ocho Rios | West Indies | 809-555-2214 |
Anne Mariachi | Princess Island SCUBA | Taveuni | Fiji | 679-311923 |
Maria Eventosh | Central Underwater Supplies | Johannesburg | Republic So. Africa | 27-11-4432458 |
Anna Rack | Safari Under the Sea | Grand Cayman | British West Indies | 809-409-4233 |
Isabelle Neece | Larry's Diving School | Milwaukie | US | 503-403-7777 |
Kevin Rider | Tora Tora Tora | Nassau | Bahamas | 809-898-0043 |
Susan Smith | Vashon Ventures | Honolulu | US | 532-099-0423 |
Joe Hatter | Divers-for-Hire | Suva | Fiji | 679-804576 |
Paul Still | Ocean Adventures | Maui | US | 776-868-9334 |
Michael Grossman | Underwater SCUBA Company | Somerset | Bermuda | 809-555-1225 |
Gillian Owen | Aquatic Drama | Tampa | US | 613-442-7654 |
Brian Miles | The Diving Company | St. Thomas | US Virgin Islands | 22-44-50098 |
Angela Jones | Norwest'er SCUBA Limited | Paget | Bermuda | 778-123-0745 |
Richard Houser | Waterspout SCUBA Center | Portland | US | 503-654-2434 |
Louise Franks | Neptune's Trident Supply | Negril | West Indies | 778-897-3546 |
Option
Tab 4
Upload
Source file:
Tab 5
Upload
Set text watermark
Text: | |
Font: | |
Font Size: | |
Color: | |
downloads
|
Set image watermark
Image: |
Click here to browse files
|
downloads
|
If you don't find the function you want, please fill in a form to request a free demo from us. Make sure the demo you want meets the following requirements:
- It is a small project that implements a particular scenario.
- It relates to our libraries stored on E-iceblue online store.
- It costs less than 2 hours for us to complete it.
- It is not a bug report.
- It is not a feature request.