Skip to content

Conversation

@marat-khazin-aspose
Copy link
Contributor

Added missing articles in documentation section of Aspose.PDF for Java for Aspose.Pdf.Facades API

@andruhovski andruhovski changed the title Feature/update pdffileeditor feat: update PdfFileEditor article Dec 12, 2025
@andruhovski andruhovski requested a review from Copilot December 12, 2025 13:55
Copy link
Contributor

Copilot AI left a 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\";
Copy link

Copilot AI Dec 12, 2025

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".

Copilot uses AI. Check for mistakes.
private static void MakeNupOfPdfUsingArrayOfPdfFilesAndStreams()
{
// The path to the documents directory
String dataDir = "C:\Workspace\";
Copy link

Copilot AI Dec 12, 2025

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".

Copilot uses AI. Check for mistakes.
fileStreams[0] = inputStream1;
fileStreams[1] = inputStream2;
// Make NUp
pdfEditor.makeNUp(inputStream1, inputStream2, outputStream);
Copy link

Copilot AI Dec 12, 2025

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.

Suggested change
pdfEditor.makeNUp(inputStream1, inputStream2, outputStream);
pdfEditor.makeNUp(fileStreams, outputStream);

Copilot uses AI. Check for mistakes.
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"
Copy link

Copilot AI Dec 12, 2025

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".

Suggested change
lastmod: "2025-12-11s"
lastmod: "2025-12-11"

Copilot uses AI. Check for mistakes.
---

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.
Copy link

Copilot AI Dec 12, 2025

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".

Copilot uses AI. Check for mistakes.
private static void MakeNupOfPdfUsingArrayOfPdfFilesAndFilePaths()
{
// The path to the documents directory
String dataDir = "C:\Workspace\";
Copy link

Copilot AI Dec 12, 2025

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".

Copilot uses AI. Check for mistakes.
private static void SplitPdfPagesFromFirstUsingFileStreams()
{
// The path to the documents directory
String dataDir = "C:\Workspace\";
Copy link

Copilot AI Dec 12, 2025

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".

Copilot uses AI. Check for mistakes.
private static void SplitPdfPagesToBulkUsingFilePaths()
{
// The path to the documents directory
String dataDir = "C:\Workspace\";
Copy link

Copilot AI Dec 12, 2025

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".

Copilot uses AI. Check for mistakes.
private static void SplitPdfToIndividualPagesUsingFilePaths()
{
// The path to the documents directory
String dataDir = "C:\Workspace\";
Copy link

Copilot AI Dec 12, 2025

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".

Copilot uses AI. Check for mistakes.
private static void MakeNupOfPdfUsingPageSizeAndStreams()
{
// The path to the documents directory
String dataDir = "C:\Workspace\";
Copy link

Copilot AI Dec 12, 2025

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".

Suggested change
String dataDir = "C:\Workspace\";
String dataDir = "C:\\Workspace\\";

Copilot uses AI. Check for mistakes.
@andruhovski andruhovski self-requested a review December 12, 2025 14:12
Copy link
Contributor

@andruhovski andruhovski left a 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

Comment on lines +4 to +5
ai_search_scope: pdf_java
ai_search_endpoint: https://docsearch.api.aspose.cloud/ask
Copy link
Contributor

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/
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

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

Comment on lines +4 to +5
ai_search_scope: pdf_java
ai_search_endpoint: https://docsearch.api.aspose.cloud/ask
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants