Default File not working

I am trying to write a pdf picture directory from an xml file using an xslt file.

My issue is that I don't have pictures of everyone, so if there is no image I want to show a default blank image.

But when a file is does not exist it does not use the default, it just tells me that it can't find the intended file.

The error is Can't open image file \dir_pics\123_ind.jpg

Here is snipit my XSLT

dir_pics\_ind.jpg

dir_pics\blank.jpg



Any help would be great.

Thanks


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

Thanks for considering Aspose and I'm extremely sorry for replying you so late.

In fact we've been busy while figuring out a mechanism on how to get your requirement accomplished. When using the code to generate the PDF document, we can use the property ImageInfo.IsImageNotFoundErrorIgnored to true which ensures that if the image is not found, the error can be ignored.

Class ImageInfo;
///


/// Gets or sets a bool value that indicates whether the "image not found" error be ignored or not.
///

public bool IsImageNotFoundErrorIgnored

It is false by default. Namely, if the image is not found, it throws an exception that Image not found. We can set it true to ignore the exception and show a red cross 'X' at where the image ought to be.

However, we can only use this attribute like "Image1.ImageInfo.IsImageNotFoundErrorIgnored = true;" . So, for xml2pdf, it is not convenient because it requires that we must set this attribute for every image manually. Which is not feasible/practical.

In order to avoid this inconvenience, we've decided to add a new attribute " Pdf.IsImageNotFoundErrorIgnored". So, your requirement will be satisfied programmatically like this:

pdf.BindXml(...);
pdf.IsImageNotFoundErrorIgnored = true; //false by default
pdf.Save();

For the sake of implementation, I have logged it in our issue tracking system as PDFNET-12046. We will further investigate this requirement in details and will keep you updated on the status of a correction.

Your patience and understanding is greatly appreciated in this regard.

We apologize for your inconvenience

Just for my planning what is the timeframe for this?

Thanks

Hello David,

Thanks for your patience.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I'm pleased to inform you that, the issue reported earlier in this forum thread is resolved in the attached hotfix.

Please try to use "pdf.IsImageNotFoundErrorIgnored = true;" to accomplish your requirement.

Please try using it and in case you still face any problem or you've any further query, please feel free to contact.

I replaced the DLL with the hotfix and did not change anything else and now I it gives me a license issue.

The date of the previous DLL was 4/23/07.

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Line 40: License.SetLicense("Aspose.Pdf.lic")

Hello David,

Can you please share license file you're using, so that we can test the scenario at our end. Please visit the following link for information on How to send a license?

We apologize for your inconvenience.

Emailed the file to you.

Hello David,

The subscription included in your license allows free upgrades until 18 Aug 2007, but this version of the product was released on 30 Nov 2009. So please renew the subscription to use this hotfix.

Please visit the following link for information on how to update the license subscription. Purchase

The issues you have found earlier (filed as 12046) have been fixed in this update.


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