Free Support Forum - aspose.com

Cannot set Page Size

I'm having problems setting the page size to A4 for a PDF created from xslfo. I cannot change the page size form anything other than what appears to be a default of 11.00 x 15.56 inches (see attached).

I'm setting the page size in my xslfo, but I've also tried setting in code, both with no luck.

I tried using the Aspose example xslfo, (in case I had some problem with my xslfo) but still the page size rermains as 11.00 x15.56.

I've taken my xslfo and the Aspose example and tried producing a PDF via this online tool and both times it produced the expected page size of 8.27 x 11.69 (A4).

I've searched the forums and the net but cannot find any help on this so would very much appreciate any help anyone can offer.

How do I get the produced PDF to have the page size specified in the xslfo?

My code:

var pdfGenerator = new Aspose.Pdf.Generator.Pdf {IsTruetypeFontMapCached = false};

pdfGenerator.BindFO(xmlDocument);

var memoryStream = new MemoryStream();
memoryStream.Seek(0, SeekOrigin.Begin);
pdfGenerator.Save(memoryStream);

var size = (int) memoryStream.Length;
var pdfDataBytes = new byte[size];
memoryStream.Position = 0;
var numberOfBytesRead = memoryStream.Read(pdfDataBytes, 0, size);
returnValue.PdfData = pdfDataBytes;

Hi Paul,


Thanks for using our products.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34275. We will investigate this
issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

codewarior:
Hi Paul,

Thanks for using our products.

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34275. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

Can you offer any update please?

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

I have asked the development team to share an ETA regarding the resolution of your reported issue. As soon as I get a feedback, I will update you via this forum thread.

Sorry for the inconvenience,

It's now been 2 months since I raised this issue and this is now a serious problem that could effect our go live date.

Can you please chase the development team for an ETA. Unless this issue can be resolved soon, we will have to look at other products for PDF generation.

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

Please accept our apologies for the delay.

Our development team is working on the issue and I have asked them to share the ETA again. As soon as I get the information, I will update you via this forum thread.

Sorry for the inconvenience,

The issues you have found earlier (filed as PDFNEWNET-34275) have been fixed in Aspose.Pdf for .NET 7.9.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(4)