Jump to content
Changes to the Jaspersoft community edition download ×

pdf - number of pages missing in file


niik

Recommended Posts

Hi,

 

I am currently working on a project, where you can export reports to PDF via JRPdfExporter and fax them with Hylafax. I noticed that on the cover page there is no entry for the number of pages. For other PDF's the number of pages will display there.

Does anyone know why there is no entry for 'number of pages' in the PDF file's header when it is exported with JRPdfExporter?

 

Thanks

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

I don't know what you mean by "cover page" and by "number of pages entry".

Everything you see in the generated document is something you have put in the report template.

If you do not put the elements in the template, you do not see them in the resulting document.

Nothing gets rendered by default.

 

Of course, seeing some report templates and PDF would help understand the problem.

 

Thank you,

Teodor

Link to comment
Share on other sites

Thanks for the reply.

 

I was not referring to anything within the report. Everything there is under control.

 

What I am referring to is the PDF file generated by JRPdfExporter. Its contents are fine - everything displays correctly. But the file header field that contains the number of pages in the PDF seems to be missing.

 

Here is an example for a non-JR PDF header that contains the number of pages:

Code:

%PDF-1.3
%âãÃÓ
138 0 obj
<<
/Linearized 1
/O 141
/H [ 923 272 ]
/L 738862
/E 200185
/N 3
/T 735983
>>
endobj

where /N 3 seems to be the number of pages.

 

This is the PDF header in a JR-generated PDF:

Code:
[code]
%PDF-1.4
%âãÃÓ
4 0 obj <</Filter/FlateDecode/Type/XObject/Length 2284/BitsPerComponent 8/Height 82/ColorSpace[/indexed/DeviceRGB 255(ÿÿÿþþþýýÿýýýýýûÿüûÿüýþûúûüþúûüùùùöùùùøöøöôõ÷öõóòîóòóðïçïíðìëæéçØåääáÃÞÚÙÇÃÚ×ÓÑÌÌ̲ÒΙÌÌÆÀ½º²®pµ±«¢ž™™™f™™Â‡ƒ3™™3â„¢f

 

I don't see any number of pages there.

 

Am I missing something, so it isn't written into the PDF?

Link to comment
Share on other sites

Hi,

 

JR uses the iText library for generating PDF.

This seems to be a very PDF specific issue that we are not aware of and could not possibly solve in JR.

I think you can get better answers about this issue on the iText forums and mailing list.

 

Not sure if there is any setting in iText that we could use to turn this on and off, but if you find out, let us know.

 

Thank you,

Teodor

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...