We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Empty Stream Question

Hi,

we use a product that works with pdfs created by Aspose.words and Aspose.pdf. This product uses a third-party pdf library which has a problem with “empty streams”. I guess they mean something like this by that (also see attached document):

16 0 obj
<</Length 17 0 R
/Filter/FlateDecode
>>
stream

endstream
endobj


As this library can’t be easily replaced, my question is if it can be somehow avoided that aspose.pdf creates such empty streams. Can the xml be modified or can be some property on the pdf object be used to prevent the creation of such empty streams?

thank you
Robert

Hello Robert,

I'm afraid I'm unable to figure out the problem in attached PDF document. Can you please guide us to the location in document where I can find it.

You can update the intermediate XML file but I'm afraid you would have to update it manually. We apologize for your inconvenience.

codewarior:

Hello Robert,

I'm afraid I'm unable to figure out the problem in attached PDF document. Can you please guide us to the location in document where I can find it.

You can update the intermediate XML file but I'm afraid you would have to update it manually. We apologize for your inconvenience.



Hello,

to clarify, the pdf is not broken or anything, i guess streams with zero length are perfectly fine according to pdf specification. Unfortunately the mentioned third-party library has problems wit such streams so i am trying to find a workaround.
In the attached document just search for this (for example using ultraedit):

stream

endstream

As far as i can tell that is how an empty stream looks like. The question is, why is it the pdf and can it be prevented?
I work wit the intermediate Xml generated by Apose.Words anyway so making changes inside it wouldn't be a problem.

thank you
Robert


Hello Robert,

Sorry for replying you late.

I've gone through the complete PDF document attached and have tried searching the empty stream (stream and endstream) but I’m afraid I’m unable to notice it.

I’m afraid prevention of such empty streams is not supported by Aspose.Pdf because it generates the document based over the contents present in intermediate XML file which generated by Aspose.Words. So I think, if you could share the source word document and highlight the sections where these empty streams are present, we can check that either they can be prevented or not during the conversion process.

I’m not sure if I’ve properly understood your problem or not. Please correct me if I’m still missing something.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Sorry for the delay and the inconvenience that you’ve been facing.