Docx to PDF conversion - Content control not set when document is protected

Hi,
When i convert a protected docx to PDF, the value of content controls are not set by Aspose.
If i unprotect the document with MS Word and save it, the values are correctly set in the new PDF generated file…
Then, how can i convert a protected docX file with Aspose without unprotected it with MS Word ??
Thanks for your help.
NB : i am using the evaluation version (still waiting licence files)
NB2 : the docx file concerned was generated with docx4j (java library )

Hi
Thanks for your request. Could you please attach your document here for testing? We will check the issue and provide you more information.
Which version of Aspose.Words do you use?
Best regards,

*alexey.noskov:
Hi

Thanks for your request. Could you please attach your document here for testing? We will check the issue and provide you more information.
Which version of Aspose.Words do you use?
Best regards,*

Hi thanks for your reply.
After somes tests, the problem is not related to document protection.
If i take the document and i just save with word (without changes), Aspose convert it correctly in PDF format.
Then i suppose the problem is due to how docx4j create the file.
I would like to post my example file, but i don’t know how to edit in order to remove confenditial data.
Best Regards

Hi
Thanks for your request. You can unzip your DOCX document (DOCX is actually a zip archive) and edit document.xml. In this case, you will remove sensitive information and do not edit the file using MS Word.
Best regards,

*alexey.noskov:
Hi

Thanks for your request. You can unzip your DOCX document (DOCX is actually a zip archive) and edit document.xml. In this case, you will remove sensitive information and do not edit the file using MS Word.
Best regards,*

Hi,
Thansk for help.
I compare the two files, the one open then save with Word and the original (created by docx4j).
The problem comes from databinding :

In fact the Content value is wrong in my document: "<BACK_ADDR_INFO> ,
Words uses correctly the databinding configuration (<w:dataBinding w:xpath="/variables/variable[@name='BACK_ADDR_INFO']"), when i open the file Word read and display the variable value (provided in an external file).
And when i save the file with Words, it replaces the value "<BACK_ADDR_INFO> by the variable value.
Then the file will be successfuly converted in PDF by aspose.
Is it possible that Aspose read the value from binding value and no from tag ?
Or how to store docw file with docx4j with the binded value ?
Many thanks for Help !

It seems the problem was already present here : https://forum.aspose.com/t/111297
But it seems to concernet dot net.
Best Reagrds

Hello

Thank you for additional information. Which version of Aspose.Words for Java are you using? Could you please try using the latest version of Aspose.Words for Java (10.0.0 Beta) and let me know how it goes on you side. You can download this version from here:
https://releases.aspose.com/words/java
I use this code for testing:

Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.pdf");

Best regards,

*AndreyN:
Hello

Thank you for additional information. Which version of Aspose.Words for Java are you using? Could you please try using the latest version of Aspose.Words for Java (10.0.0 Beta) and let me know how it goes on you side. You can download this version from here:
https://releases.aspose.com/words/java
I use this code for testing:
Document doc = new Document(“C:\Temp\in.docx”);
doc.save(“C:\Temp\out.pdf”);
Best regards,*

Hi,
i tried with version 10 and results is the same…
Best Regards

Hi,
More informations in docx about my tag :
An custom tag example with variables in \customXml\item1.xml :

<?xml version="1.0" encoding="UTF-8" ?>
<variables><variable name="LETTER_DATE">September 2, 2009</variable>

My content control in document.xml

<w:dataBinding w:xpath="/variables/variable[@name='LETTER_DATE']" w:storeItemID="{E04553D4-5006-42D8-8E57-27ECBB840089}" />

Best Regards

Hi Alexandre,
Thank you for additional information. But anyway we need your sample document to analyze the problem. So could you create a simple document that will allow us to reproduce the problem and attach it here? We will check it and provide you more information.
Best regards,

Hi,
Here an attached example which doesn’t work.
The value between herringbone must be replace by values of binded variables (see item1.xml).
Word replaces correctly them but not Aspose.
Best Regards

Hi ,
My problem is resolved.
I used the databinding feature in docx4j and its solves my problem.
Best Regards

Hi
It is perfect that you managed to resolve the problem. But anyways, I managed to reproduce the problem with your document on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards,

The issues you have found earlier (filed as WORDSNET-4678) have been fixed in this .NET update and this Java update.

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