You are viewing limited content. For full access, please sign in.

Question

Question

PDFExporter returning no pages error for documents that contain pages

asked on April 3, 2014

I have a customer using an integration that uses PDFExporter for some of its operations.

Occasionally when running a process that attempts to use the ExportPages method, it returns a message that the document has no pages, even though I can go look at the document and confirm that it does have pages.

 

the message returned when calling ExportPages is:

Invoke of: ExportPages
Source: itextsharp
Description: The document has no pages.

The error seems pretty sporadic and infrequent.

I have not been able to track down any consistency to the error occuring.

 

1 0

Replies

replied on April 3, 2014

Can you confirm that the PageRange object that you are passing to ExportPages has pages in it that are actually in the document? If you are constructing the PageRange using the DocumentInfo's PageCount property, be sure to call Refresh on the DocumentInfo before accessing the PageCount, or else it will always be zero.

0 0
replied on April 3, 2014

PDFExporter.ExportPages just accepts an LFDocument as an argument.

There is a PdfOptions property on the PDFExporter object, but none are being set as far as I know.

1 0
replied on April 3, 2014

Oh, oops you're using the COM object. I was talking about the .Net DocumentExporter, my bad. Unfortunately I don't have enough experience with PDFExporter to give you a solution, but I'd start by looking at the same thing. It looks like the PdfOptions property has a setPagesToExport that takes an int array. I'd try setting that property and making sure it contains pages in the document. Someone else might be able to give some better insight, though.

1 0
replied on September 22, 2014 Show version history

I know this is a bit old, but I have the same problem.

- using sdk 8.3, RA & Document Services
- document pages are pdf's
- documents are not indexed

I found that if I index the documents, the error is resolved.

I really didn't want to spend the processing & storage on indexing these documents and since my pages were already in a pdf format, I used the ExportElecDoc....

exporter.ExportElecDoc(DocInfo.GetLatestVersion(), mPDFFileName);

Hope this helps..

 

1 0
replied on April 7, 2014

Probably the document you want to export doesn't contain image pages. 

0 0
replied on April 7, 2014

We have confirmed the document does have pages.

0 0
replied on August 28, 2014

"Probably the document you want to export doesn't contain image pages. "  I'm getting the same error. Are you saying the exportPDF function will only export the text pages if the document also contains image pages?

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.