PDF XSL-FO can't handle PDF as external graphic

Hi there,
We are currently evaluating Aspose.PDF for use in our product for Document Generation. The PDF Documents we want to generate will contain PDF attachments throughout. Currently, all of our templates are in XSLFO and XSLT markup. However, when we use:

<fo:external-graphic display-align=“center” src=“url({foo.pdf)” max-width="{$MMO-MAX_BODY_WIDTH}" max-height="{$MMO-MAX_BODY_HEIGHT}" content-width=“scale-to-fit” scaling=“uniform” height=“95%”/>

to attach the PDF, we get a blank page. Is attaching PDFs in this way supported? If not, are there alternatives we could use to meet our requirement. Unfortunately, it’s not possible for us to change all our templates to be Aspose XML.

Hi there,


Sorry for
the inconvenience faced. I’ve managed to observe the attachment issue.
For further investigation I’ve logged an issue in our issue tracking system as
PDFNEWNET-34985 and also linked your
request to it. We will keep you update via this thread regarding the issue
status.

Please feel free to contact us for any further assistance.

Best Regards

Hi there,


Thanks for your patience. We have further investigated the issue and found that according to FO specification, only few graphics formats can be used as external graphic and Pdf is not supported. So we can’t used use PDF files in such way. I’m afraid this feature also will not be supported by Aspose.Pdf. As a work around you can convert Pdf to Jpeg or Gif and then put into source XSLFO url for the purpose.

Please feel free to contact us for any further assistance.

Best Regards,

thanks for the reply. Could you provide me with an example of how to do this?

Hi there,


Thanks for your inquiry. Please check following documentation link for details/code snippet to convert Pdf document to Jpeg image.


Please feel free to contact us for any further assistance.

Best Regards,

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan