[xep-support] Re: PDF output is not created

From: <kevin_at_ADDRESS_REMOVED>
Date: Thu Feb 13 2020 - 11:45:48 PST

It looks to me that the outputStream is closed before it is fully written.

I am no VB person, but maybe the stream needs to be flushed before force
closing it?

Although it was ever noted before, it could mean you have more complicated,
larger documents or something else that is scanning the stream while writing
to the disk . or it could have been some .NET patch that changed the
behavior. Don't know but I would try forcing a flush.

 

I do know I took your sample data and I ran XEP Assistant.exe and even
though you have a few issues in overcontrained or not enough room to format,
it formats fine.
XEP Assistant is written in C# and the code is right inside the developer's
kit.

 

Kevin

 

From: Darren Munt <darrenm@ardex.com.au>
Sent: Wednesday, February 12, 2020 2:58 PM
To: kevin@renderx.com; RenderX Community Support List
<xep-support@renderx.com>
Subject: RE: [xep-support] Re: PDF output is not created

 

Thanks. I have progressed slightly, it appears that XEP is throwing the
error: Unexpected end of stream

 

XEP is invoked thus:

 

    Dim logger As XEPLogger = New XEPLogger(sDumpFileName)

    Dim conf As IConfiguration = New Configuration

    Dim formatter As IFormatter = conf.CreateFormatter(logger)

    Dim success As Boolean

    Dim sourceStream As System.IO.FileStream

    Dim outStream As System.IO.FileStream

 

    Dim sOutFileName As String = MakeOutFileName(FOPath)

 

    Try

      sourceStream = New System.IO.FileStream(FOPath,
System.IO.FileMode.Open)

      outStream = New System.IO.FileStream(sOutFileName,
System.IO.FileMode.Create)

 

      success = formatter.Format(sourceStream, MakeSystemID(FOPath),
"application/pdf", outStream)

 

    Catch ex As Exception

      Throw ex

 

    Finally

      Warnings = logger.GetWarnings

      Errors = logger.GetErrors

 

      If Not (sourceStream Is Nothing) Then

        sourceStream.Close()

      End If

 

      If Not (outStream Is Nothing) Then

        outStream.Close()

      End If

    End Try

 

    If success Then

      Return sOutFileName

    Else

      Return ""

    End If

 

The error is trapped by the Try.Catch block. I know it is XEP throwing the
error because my dump of the XEP.Logger messages exists, therefore we are
getting past the two stream creates, and it is processing the FO file. The
outStream PDF file exists, but it is 0kb. I believe that this file is
created by this line:

 

outStream = New System.IO.FileStream(sOutFileName,
System.IO.FileMode.Create)

 

From the logger dump, it seems that the error relates to the outStream file.
XEP is able to process the FO that I am sending in but it appears to be
failing at the point that it tries to write the PDF output. I thought this
might be because Cliser does not have permissions to write to the file, but
the security settings on the PDF file created by the code above show that
SYSTEM user has Full Control, and it did indeed work a couple of weeks ago.
Cliser executes under the Local System account which should have the same
privileges as SYSTEM (I believe they are the same SID).

 

I have attached the following:

 

CliserService.exe.config: Unfortunately the time stamp on this file is
yesterday because I updated the LOG-FILE setting so that I could see if any
errors were being reported. I am fairly certain that this file has not been
updated since it was last working. As you can see, apart from the log file,
the only other setting that has been changed since the original install is
the JAVA-CLASSPATH, which was updated to point to the rt29446.jar file. I
have checked this path.

 

Cliserservicelog.log: log output from the Cliser service.

 

Xepdump.log: A log of all messages sent by XEP.ILogger

 

 

From: Xep-support [mailto:xep-support-bounces@renderx.com] On Behalf Of
kevin@renderx.com <mailto:kevin@renderx.com>
Sent: Thursday, 13 February 2020 5:21 AM
To: 'RenderX Community Support List' <xep-support@renderx.com
<mailto:xep-support@renderx.com> >
Subject: [xep-support] Re: PDF output is not created

 

I think more information is required.

 

1. How are you running RenderX? Through your own API? through XEP
Assistant? Through command line?
2. You should post your complete setting in CliserService.exe.config
(and maybe check them) . has a path changed or java installation been
updated?
3. What is the full log not just the last few lines?

 

Kevin Brown
RenderX

 

From: Xep-support <xep-support-bounces@renderx.com
<mailto:xep-support-bounces@renderx.com> > On Behalf Of Darren Munt
Sent: Tuesday, February 11, 2020 11:20 PM
To: RenderX Community Support List <xep-support@renderx.com
<mailto:xep-support@renderx.com> >
Subject: [xep-support] PDF output is not created

 

I'm having a problem with an XEP installation that has been working
previously but seems to be now having an issue.

 

The generation process seems to work OK in that there are no errors
reported, but the resulting PDF is 0kb in size. I have compared the log
output from a recent execution with one done a couple of weeks ago when it
was working fine. The only difference I can see is that the last few log
lines are missing from the recent one. These lines exist in the successful
log but not in the bad one:

 

event page-number 1

event page-number 2

event page-number 3

event page-number 4

closeState generate

 

The failed run stops at this line:

 

event output-format pdf

 

Can you give me any suggestions on why it might be falling over now? Cliser
is running under the System Account so I don't think it's file permissions.

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Thu, 13 Feb 2020 11:45:48 -0800

This archive was generated by hypermail 2.1.8 : Thu Feb 13 2020 - 11:44:00 PST