-
Notifications
You must be signed in to change notification settings - Fork 5
feat: update PdfFileEditor article #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds comprehensive documentation for the PdfFileEditor class in the Aspose.PDF for Java Facades API. It fills in missing articles for common PDF manipulation operations, providing code examples for both file path and stream-based approaches.
Key Changes
- Added five new documentation articles covering PDF manipulation operations (split, insert, delete, make booklet, make N-Up)
- Updated the PdfFileEditor index page to include an overview of file editing, imposition, and splitting features
- Removed duplicate font-related content from the formatting PDF document article
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 25 comments.
Show a summary per file
| File | Description |
|---|---|
| split-pdf-pages/_index.md | Documents methods for splitting PDF pages using various approaches (from first, to bulk, to end, to individual pages) |
| make-nup-of-pdf-files/_index.md | Explains how to create N-Up layouts of PDF files with different configuration options |
| make-booklet-of-pdf/_index.md | Provides instructions for creating booklets from PDF files with customizable page arrangements |
| insert-pdf-pages/_index.md | Details methods for inserting PDF pages between documents using page ranges or arrays |
| delete-pdf-pages/_index.md | Shows how to delete specific pages from PDF documents |
| pdffileeditor/_index.md | Updated overview page organizing PdfFileEditor features into logical categories |
| formatting-pdf-document/_index.md | Removed duplicate font substitution and subsetting documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private static void MakeNupOfPdfUsingPageSizeHorizontalAndVerticalValuesAndStreams() | ||
| { | ||
| // The path to the documents directory | ||
| String dataDir = "C:\Workspace\"; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path uses single backslashes without proper escaping. In Java string literals, backslashes must be escaped. This should be "C:\Workspace\" instead of "C:\Workspace".
| private static void MakeNupOfPdfUsingArrayOfPdfFilesAndStreams() | ||
| { | ||
| // The path to the documents directory | ||
| String dataDir = "C:\Workspace\"; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path uses single backslashes without proper escaping. In Java string literals, backslashes must be escaped. This should be "C:\Workspace\" instead of "C:\Workspace".
| fileStreams[0] = inputStream1; | ||
| fileStreams[1] = inputStream2; | ||
| // Make NUp | ||
| pdfEditor.makeNUp(inputStream1, inputStream2, outputStream); |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fileStreams array is created but never used. The code creates an array and assigns input streams to it, but then directly passes inputStream1 and inputStream2 to makeNUp method instead of using the array. Either remove the unused array or use it in the method call.
| pdfEditor.makeNUp(inputStream1, inputStream2, outputStream); | |
| pdfEditor.makeNUp(fileStreams, outputStream); |
| weight: 80 | ||
| url: /java/make-booklet-of-pdf/ | ||
| description: This section explains how to make booklet of PDF with com.aspose.pdf.facades using PdfFileEditor class. | ||
| lastmod: "2025-12-11s" |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lastmod date has an extra 's' character at the end: "2025-12-11s". This should be "2025-12-11".
| lastmod: "2025-12-11s" | |
| lastmod: "2025-12-11" |
| --- | ||
|
|
||
| If you want to delete a number of pages from the PDF file which is residing on the disk then you can use the overload of the | ||
| [Delete]method which takes following three parameters: intput file path, array of page numbers to be deleted, and output PDF file path. The second parameter is an integer array representing all of the pages which need to be deleted. The specified pages are removed from the intput file and the result is saved as output file. The following code snippet shows you how to delete PDF pages using file paths. |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in the text: "intput" should be "input".
| private static void MakeNupOfPdfUsingArrayOfPdfFilesAndFilePaths() | ||
| { | ||
| // The path to the documents directory | ||
| String dataDir = "C:\Workspace\"; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path uses single backslashes without proper escaping. In Java string literals, backslashes must be escaped. This should be "C:\Workspace\" instead of "C:\Workspace".
| private static void SplitPdfPagesFromFirstUsingFileStreams() | ||
| { | ||
| // The path to the documents directory | ||
| String dataDir = "C:\Workspace\"; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path uses single backslashes without proper escaping. In Java string literals, backslashes must be escaped. This should be "C:\Workspace\" instead of "C:\Workspace".
| private static void SplitPdfPagesToBulkUsingFilePaths() | ||
| { | ||
| // The path to the documents directory | ||
| String dataDir = "C:\Workspace\"; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path uses single backslashes without proper escaping. In Java string literals, backslashes must be escaped. This should be "C:\Workspace\" instead of "C:\Workspace".
| private static void SplitPdfToIndividualPagesUsingFilePaths() | ||
| { | ||
| // The path to the documents directory | ||
| String dataDir = "C:\Workspace\"; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path uses single backslashes without proper escaping. In Java string literals, backslashes must be escaped. This should be "C:\Workspace\" instead of "C:\Workspace".
| private static void MakeNupOfPdfUsingPageSizeAndStreams() | ||
| { | ||
| // The path to the documents directory | ||
| String dataDir = "C:\Workspace\"; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path uses single backslashes without proper escaping. In Java string literals, backslashes must be escaped. This should be "C:\Workspace\" instead of "C:\Workspace".
| String dataDir = "C:\Workspace\"; | |
| String dataDir = "C:\\Workspace\\"; |
andruhovski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, check my comments and Copilot Review
| ai_search_scope: pdf_java | ||
| ai_search_endpoint: https://docsearch.api.aspose.cloud/ask |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this feature works with Java?
| ai_search_scope: pdf_java | ||
| ai_search_endpoint: https://docsearch.api.aspose.cloud/ask | ||
| weight: 70 | ||
| url: /javas/delete-pdf-pages/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, check URL, at least it should be
/java/delete-pdf-pages/
|
|
||
| ## Delete PDF Pages Using Streams | ||
|
|
||
| The [Delete] method of [PdfFileEditor] class also provides an overload which allows you to delete the pages from the input PDF file, while both the input and output files are in the streams. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The [Delete] method of [PdfFileEditor] class also provides an overload which allows you to delete the pages from the input PDF file, while both the input and output files are in the streams. | |
| The `Delete` method of `PdfFileEditor` class also provides an overload which allows you to delete the pages from the input PDF file, while both the input and output files are in the streams. |
| --- | ||
| title: Insert PDF pages | ||
| type: docs | ||
| ai_search_scope: pdf_java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please confirm that it works with Java
| ai_search_scope: pdf_java | ||
| ai_search_endpoint: https://docsearch.api.aspose.cloud/ask |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as on previous pages
| @@ -1,10 +1,10 @@ | |||
| --- | |||
| title: PdfFileEditor Class | |||
| title: Working with Documents | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please confirm that these changes are correct according to the SEO strategy.
Added missing articles in documentation section of Aspose.PDF for Java for Aspose.Pdf.Facades API