I want to add pixel tracking to a doc file so that i am able to track the open rate of documents. I tried something like this :
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertHtml(
“<img src=“www.mypixeltrackingurl.com”” +
“height=“0” width=“0” visibility=“hidden” />”
);
doc.save("/home/" + “AsposeAddHyperlinks.doc”);
But i get the hit on this url when i create the doc, is there any way the image is not downloaded during doc creation time, but only when the doc is opened.
Thanks for your inquiry. Open rate tracking is a way to check how many of your contacts have opened (or viewed) the document. It seems that your query is more about the MS Word (Document viewer) behavior than Aspose.Words.
With Aspose.Words you can perform document processing tasks. Could you please share some more detail about your query along with expected output document? We will then provide you more information about your query along with code.
Thanks for your inquiry. In your case, we suggest you please use INCLUDEPICTURE field. Please use FieldIncludePicture.SourceFullName property to get or set the location of the picture using an IRI.
Please check the following code example. To get the updated image, you need to update the field in MS Word by pressing F9 key. Hope this helps you.
Document doc = new Document(); DocumentBuilder documentBuilder = new DocumentBuilder(doc); long startTime = System.currentTimeMillis(); FieldIncludePicture fieldIncludePicture = (FieldIncludePicture )documentBuilder.insertField(FieldType.FIELD_INCLUDE_PICTURE, false); fieldIncludePicture.setSourceFullName("http://www.aspose.com/images/aspose-logo.gif");
Thanks for your inquiry. If you want to save the document to PDF, please change the extension in Document.Save method as show below. If this does not help you, please share some more detail about your query. We will then guide you accordingly.
Thanks for your inquiry. Your query is related to Aspose.Pdf API. I am moving this forum thread to Aspose.Total forum where you'll be guided appropriately.
Hi, I do not want to save the file as html but add a similar image from a url into a pdf file. Is that possible using aspose.pdf?
Hi Himanshi,
Thanks for contacting support.
Currently the API supports the feature to load/reference an image from URL and place it inside the document. However currently it does not support the feature to add reference of remote Image so that it is loaded when viewing the document. For the sake of correction, I have logged it as PDFJAVA-36825 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.
The linked ticket ID PDFJAVA-36825 is not resolved yet. We have logged an ETA request under the same ticket ID PDFJAVA-36825. We will let you know once a significant progress has been made in this regard.
The linked ticket ID PDFJAVA-36825 is not resolved yet. We are getting the most recent status, and will let you know soon. Please confirm, are you working on the .NET platform?
This feature request has been logged under the ticket ID PDFNET-44706 for the .NET platform in our issue tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.
The linked ticket ID PDFJAVA-36825 is dependent upon an internal ticket, and the ticket ID PDFNET-44706 is pending for the analysis. We will investigate as per the development schedules, and notify you regarding the fixed status of each ticket. In order to escalate priority, we recommend our clients to post their critical issues (ticket Ids) in the paid support forum. Please refer to this helping link: Aspose support options