![]() |
Engine.GetPageCount() |
Post Reply
|
| Author | |
mattucg
Newbie
Joined: 28 Sep 2010 Posts: 32 |
Post Options
Quote Reply
Topic: Engine.GetPageCount()Posted: 19 Oct 2010 at 3:42pm |
|
When using Engine.Render(), followed by Engine.GetPageCount(), I am getting mixed results. When the input file is XML and I use template to generate a PDF, the correct number of pages added to the merge context is returned. When the input file is PDF, 0 is returned, regardless of that file's length.
Any ideas?
|
|
![]() |
|
gabig
Admin Group
Joined: 06 Aug 2008 Posts: 144 |
Post Options
Quote Reply
Posted: 20 Oct 2010 at 9:00am |
|
Hello,
Try adding all your inputs to a DAL job. You should get the right page count. Also, if you pass null as input, you will get the page count of the last rendering operation. Regards, Gabi |
|
![]() |
|
mattucg
Newbie
Joined: 28 Sep 2010 Posts: 32 |
Post Options
Quote Reply
Posted: 20 Oct 2010 at 12:25pm |
|
I'm still having problems. Could you explain what you mean by pass null as input? I tried the following:
Engine eng = new Engine();
RenderingParameters param = new RenderingParameters();
param.MergeContextID = Engine.GetNewMergeContextID();param.InputFormat = Engine.InputFormat.PDF;param.OutputFormat = Engine.OutputFormat.PDF; Stream inStm = new FileStream(@"C:\Docs\treason.pdf", FileMode.Open, FileAccess.Read); Stream outStm = new FileStream(@"C:\Dev\Ecrion\merge.pdf", FileMode.Create, FileAccess.Write);eng.Render(inStm, outStm, param); int pgCount = eng.GetPageCount(null, null); |
|
![]() |
|
najarTheKing
Newbie
Joined: 11 Jan 2012 Location: KC Posts: 1 |
Post Options
Quote Reply
Posted: 11 Jan 2012 at 12:32pm |
|
I'm having a similar problem where I get the following error when I do
Engine eng = new Engine(); eng.Render(inFile, outFile, param); int pageCount = eng.GetPageCount(inFile, param); // OR pageCount = eng.GetPageCount(inFile, null); The error I get is: java.lang.Exception: Server exception occured: An unreachable code exception has occurred. |
|
![]() |
|
radup
Admin Group
Adminstrator Joined: 19 May 2008 Posts: 83 |
Post Options
Quote Reply
Posted: 17 Jan 2012 at 10:25am |
|
Hi najarTheKing,
Please send us an email to support@ecrion.com along with XF Rendering Server version, build number and log file. Regards, Radu |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |