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, extract text/image from the PDF, merge/split PDF, draw text/image/shape/barcode to the PDF, create and fill in form fields, add and delete PDF layers, overlay PDF, insert text/image watermark to the PDF, add/update/delete PDF bookmarks, add tables to the PDF, compress PDF document etc. Besides, Spire.PDF for Java can be applied easily to convert PDF to XPS, XPS to PDF, PDF to SVG, SVG to PDF,PDF to Excel, PDF to Word, PDF to HTML, HTML to PDF and PDF to PDF/A 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
Conversion 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
Spire.PDF for Java supports to draw text/image/table/barcode and shape on the PDF document from scratch, extract text and image from the PDF file, create/fill in/delete PDF form fields, add text and image watermarks to PDF, add/update/delete PDF bookmarks, operate hyperlinks/attachments/annotations on the PDF, add image/text stamp to PDF document.Document Settings features
Document information can be set with Spire.PDF for Java including document properties, viewer preference such as page orientation, page size, and zoom factor.High Quality PDF File Conversion
Spire.PDF for Java supports to convert PDF to XPS, PDF to Image, PDF to SVG, SVG to PDF, PDF to Excel, XPS to PDF, PDF to PDF/A with high quality.Security Features
Spire.PDF for Java supports to add PDF digital signatures and verify the signatures on the PDF documents, encrypt and decrypt the PDF document, change 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.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<int[]> inkList = new ArrayList<>(); int[] intPoints = new int[] { 100,800, 200,800, 200,700 }; inkList.add(intPoints); PdfInkAnnotation ia = new PdfInkAnnotation(inkList); ia.setColor(new PdfRGBColor(Color.RED)); ia.getBorder().setWidth(12); ia.setText("e-iceblue"); ((PdfNewPage) pdfPage).getAnnotations().add(ia); doc.saveToFile("inkannotation.pdf"); |
Bug | SPIREPDF-6606 | Optimizes the PDF signature time to match the system local time. |
Version: 10.3.1
Category | ID | Description |
Bug | SPIREPDF-6548 | Fixes the issue that the PDF type obtained by using pdfDocument.getConformance() was incorrect. |
Bug | SPIREPDF-6554 | Fixes the issue that it threw "StackOverflow" exception when using setRowSpan() twice. |
Bug | SPIREPDF-6581 | Fixes the issue that content was lost after converting OFD to PDF. |
Version: 10.2.6
Category | ID | Description |
Bug | SPIREPDF-6523 | Fixes the issue that the program threw java.lang.NullPointerException exception when creating a template for the first page. |
Bug | SPIREPDF-6527 | Fixes the issue that compression of PDF documents did not work. |
Bug | SPIREPDF-6534 | Fixes the issue that the program threw java.lang.NullPointerException when comparing documents. |
Bug | SPIREPDF-6535 | Fixes the issue that the content was garbled after adding a digital signature. |
Bug | SPIREPDF-6542 | Fixes the issue that the MIME type of the added attachment was incorrect. |
Bug | SPIREPDF-6543 | Fixes the issue that the result of verifying the signature was incorrect. |
Version: 10.2.0
Category | ID | Description |
Bug | SPIREPDF-6465 | Fixes the issue that the creation time obtained from a PDF document was wrong. |
Bug | SPIREPDF-6503 | Fixes the issue that redrawing extracted images to a page failed |
Bug | SPIREPDF-6504 | Fixes the issue that the document size did not change after deleting some pages. |
Bug | SPIREPDF-6522 | Fixes the issue that the program throws java.lang.ArrayIndexOutOfBoundsException when using PDFTextReplacer in multiple threads. |
Version: 10.1.9
Category | ID | Description |
New feature | SPIREPDF-6479 | Adds two new methods for decrypting PDFs.
PdfDocument pdf1 =new PdfDocument(); pdf1.loadFromFile("input.pdf"); pdf1.decrypt(); pdf1.saveToFile("output.pdf"); PdfDocument pdf2 =new PdfDocument(); pdf2.loadFromFile("input.pdf"); pdf2.decrypt(ownerPassword); pdf2.saveToFile("output.pdf"); |
Bug | SPIREPDF-6429 | Fixes the issue that the program threw "java.lang.NullPointerException" when converting OFD to PDF. |
Bug | SPIREPDF-6482 | Fixes the issue that the program hung when converting PDF to images. |
Bug | SPIREPDF-6485 | Fixes the issue that the content was lost after converting OFD to PDF. |
Bug | SPIREPDF-6486 | Fixes the issue that the program threw "java.lang.NullPointerException" when converting PDF to XLSX. |
Bug | SPIREPDF-6502 | Fixes the issue that the content was garbled after replacing text. |
Version: 10.1.5
Category | ID | Description |
Bug | SPIREPDF-6484 | Fixes the issue that no resulting documents were generated after performing batch text replacement on multiple PDF documents under multi-threading. |
Version: 10.1.3
Category | ID | Description |
New feature | SPIREPDF-6454 | Improves the efficiency of drawing watermarks. |
New feature | SPIREPDF-6459 | Adds the PdfTextReplacer interface to implement text replacement function.
PdfDocument pdf = new PdfDocument(); pdf.loadFromFile("sample.pdf"); PdfPageBase page = pdf.getPages().get(0); PdfTextReplacer replacer = new PdfTextReplacer(page); PdfTextReplaceOptions options= new PdfTextReplaceOptions(); options.setReplaceType(EnumSet.of(ReplaceActionType.WholeWord)); replacer.replaceText("www.google.com", "1234567"); pdf.saveToFile(outputFile); |
New feature | - | Adds the PdfImageHelper interface to implement image deletion, extraction, replacement, and compression functions. Key code snippet: PdfImageHelper imageHelper = new PdfImageHelper(); PdfImageInfo[] imageInfoCollection= imageHelper.getImagesInfo(page); Delete image: imageHelper.deleteImage(imageInfoCollection[0]); Extract image: int index = 0; for (com.spire.pdf.utilities.PdfImageInfo img : imageInfoCollection) { BufferedImage image = img.getImage(); File output = new File(outputFile_Img + String.format("img_%d.png", index)); ImageIO.write(image, "PNG", output); index++; } PdfImage image = PdfImage.fromFile("ImgFiles/E-iceblue logo.png"); imageHelper.replaceImage(imageInfoCollection[i], image); Compress image: for (PdfPageBase page : (Iterable |
Bug | SPIREPDF-6468 | Fixes the issue that the program threw java.lang.StringIndexOutOfBoundsException exception when saving documents. |
Version: 9.11.3
Category | ID | Description |
Bug | SPIREPDF-5830 | Fixes the issue that extracting the contents of tables in PDF failed. |
Bug | SPIREPDF-6315 | Fixes the issue that the content was drawn repeatedly when converting PDF to PPTX on Ubuntu system. |
Bug | SPIREPDF-6323 | Fixes the issue that the program threw "No 'DCWGQU+CambriaMath' font found!" when converting PDF to Word on Linux system. |
Bug | SPIREPDF-6359 | Fixes the issue that the binding direction of the cover was incorrect when creating a booklet. |
Bug | SPIREPDF-6364 | Fixes the issue that the program threw "PDF file structure is not valid" exception when loading PDF. |
Bug | SPIREPDF-6389 | Fixes the issue that the program threw "NullPointerException" when using the appendPage() method to merge PDF documents. |
Version: 9.10.3
Category | ID | Description |
New feature | - | Synchronizes the new encryption and decryption interface to Java, and supports configuring the AES encryption algorithm.
PdfEncryptionAlgorithm.AES //Create password security policies PdfSecurityPolicy securityPolicy = new PdfPasswordSecurityPolicy("", "123456"); //Set AES encryption algorithm securityPolicy.setEncryptionAlgorithm( PdfEncryptionAlgorithm.AES_256); //Set document permissions (ownership), default is ForbidAll. securityPolicy.setDocumentPrivilege(PdfDocumentPrivilege.getForbidAll()); securityPolicy.getDocumentPrivilege().setAllowDegradedPrinting(true); securityPolicy.getDocumentPrivilege().setAllowModifyAnnotations(true); securityPolicy.getDocumentPrivilege().setAllowAssembly(true); securityPolicy.getDocumentPrivilege().setAllowModifyContents(true); securityPolicy.getDocumentPrivilege().setAllowFillFormFields(true); securityPolicy.getDocumentPrivilege().setAllowPrint(true); pdf.encrypt(securityPolicy); PdfDocument pdf = new PdfDocument(); //Pass the open password to open the PDF document pdf.loadFromFile(inputFile, "1234"); //Decrypt pdf.decrypt(); pdf.saveToFile(outputFile, FileFormat.PDF); pdf.dispose(); |
New feature | SPIREPDF-6306 | Supports setting the names of existing fields.
PdfDocument document=new PdfDocument(); document.loadFromFile("input.pdf"); PdfFormWidget formWidget = (PdfFormWidget)document.getForm(); for (int i = 0; i < formWidget.getFieldsWidget().getCount(); i++) { PdfField field = (PdfField)formWidget.getFieldsWidget().get(i); for (PdfFieldWidget widget : (Iterable extends PdfFieldWidget>) formWidget.getFieldsWidget()) { if (widget.getName() == "oldName") { widget.setName("NewName"); } } } document.saveToFile("result.pdf",FileFormat.PDF); |
Bug | SPIREPDF-6253 SPIREPDF-6313 |
Fixes the issue that the background was incorrect after converting PDF to SVG. |
Bug | SPIREPDF-6275 | Fixes the issue that the shape color was incorrect and the content was missing after converting PDF to PPTX. |
Bug | SPIREPDF-6277 | Fixes the issue that images were obstructed after converting PDF to PPTX. |
Bug | SPIREPDF-6300 | Fixes the issue that the standard validation failed after converting PDF to PDFA2B. |
Bug | SPIREPDF-6307 | Fixes the issue that stamps were lost after converting OFD to PDF. |
Bug | SPIREPDF-6324 | Fixes the issue that the program threw "NullPointerException" when loading PDF. |
Version: 9.9.6
Category | ID | Description |
New feature | SPIREPDF-6082 SPIREPDF-6178 SPIREPDF-6220 |
Provides the XlsxSpecialTableLayoutOptions interface to optimize formatting when converting PDF with tables to Excel.
PdfDocument document=new PdfDocument(); document.loadFromFile("input.pdf"); XlsxSpecialTableLayoutOptions options=new XlsxSpecialTableLayoutOptions(false, false, false); document.getConvertOptions().setPdfToXlsxOptions(options); document.saveToFile("output.pdf", FileFormat.XLSX); |
New feature | SPIREPDF-6247 | Supports converting PDF to SVGZ.
document.saveToFile("output.svgz", FileFormat.SVGZ); |
New feature | SPIREPDF-6249 | Synchronized the function of comparing the contents of PDF documents to JAVA.
PdfDocument pdf1 = new PdfDocument(inputFile_1); PdfDocument pdf2 = new PdfDocument(inputFile_2); PdfComparer compare = new PdfComparer(pdf1, pdf2); compare.getOptions().setPageRanges(0, pdf1.getPages().getCount() - 1, 0, pdf2.getPages().getCount() - 1); compare.compare(outputFile); |
Bug | SPIREPDF-6252 | Fixes the issue that the page size is inconsistent after converting PDF to SVG. |
Bug | SPIREPDF-6276 | Fixes the issue that the text is duplicated after converting PDF to PPTX. |
Bug | SPIREPDF-6280 | Fixes the issue that the program threw "PDF file structure is not valid" when loading PDF documents. |
Bug | SPIREPDF-6281 | Fixes the issue that the program threw "NullPointerException" when signing PDF. |
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.