• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sample .NET Core Project PDF Split Limited to 20 Pages

New Here ,
Sep 03, 2021 Sep 03, 2021

Copy link to clipboard

Copied

I downloaded the SplitPDFIntoNumberofFiles C# project from Adobe SDK. 

 

The code below works sucessfully when splitting a PDF document to 20 pages, but if I set it over 20 pages, I get an exception error that the operation could not split beyond 20 pages.

 

// Set the number of documents to split the input PDF file into.
splitPDFOperation.SetFileCount(20);

 

Can anyone please provide any guidance or assistance ?

Views

674

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 03, 2021 Sep 03, 2021

Copy link to clipboard

Copied

I'm not understanding your question. You seem to be trying to split a document into 20 page chunks but the code you are showing is telling the split operation to break the file up into 20 separate files and allow the service to determine the number of pages.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 03, 2021 Sep 03, 2021

Copy link to clipboard

Copied

Hi @Joel_Geraci , 

 

I need to split a PDF document that has more than 20 pages, but the function only allows me to split up to 20 pages. 

 

I should stated that when I call the function to split beyond 20 pages, an error occurs.

 

// Set the number of documents to split the input PDF file into.
splitPDFOperation.SetFileCount(30);

 

If I set it below to 20 or below, it works. It does not work when I set it over 20. I hope that is clear.

I attached the error as well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 03, 2021 Sep 03, 2021

Copy link to clipboard

Copied

To provide more information from the error I am receiving from the Adobe API, please see the error log below:

 

2021-09-03 11:08:26,360 ERROR SplitPDFIntoNumberOfFiles.Program - Exception encountered while executing operation
System.ArgumentException: Input PDF file cannot be split into more than 20 documents

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 03, 2021 Sep 03, 2021

Copy link to clipboard

Copied

LATEST

You can split a document by any number of pages but there is a 20 output file upper limit for splitting a PDF of any length. I've requested that the documentation be updated to make this clear.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources