[Bug] Pdf generation fails when cache enabled

If I enable caching of pages, when I try to generate a pdf using

`

`

in my theme, I got a blank pdf. At the first click it works great.

You could try here: http://www.consolidamento-debiti.org/home

Can you reproduce this on vanilla content?

I have added a ticket with more details here: https://ortussolutions.atlassian.net/projects/CONTENTBOX/issues/CONTENTBOX-635?filter=reportedbyme

Hi Luis,

to reproduce:

`
install -contentbox-be

`

Enable cache for pages and entries. Choose default theme.

On the default theme go to about page /about and try to click on pdf link. The first time the pdf is generated. Close the pdf page, click again on pdf link you get an error.

I think that something is missing on the pdf generation. Dumping data.content

`

switch( rc.format ){
case “pdf” : {
WriteOutput(data.content);abort;
data.content = dataMarshaller.marshallData( data=data.content, type=“pdf” );
data.contentType = “application/pdf”;
data.isBinary = true;
break;
}
case “doc” : {
data.contentType = “application/msword”;
break;
}
}

`

on \modules\contentbox-ui\handlers you see that on the first generation you have at the end of the page:

`

/Size 23 /ID [<0ec0c83d48966f264143666c2cf45582><0ec0c83d48966f264143666c2cf45582>] >> startxref 40631 %%EOF

`

on the second click:

`

/Size 23 /ID [] >> startxref 40631 %%EOF

`

So the problem is on the /ID string I suppose.