- Home
- Forum
- ASP.NET Core - EJ 2
- .NET Core, DocIO and PDF Conversion - Custom Document properties removed
.NET Core, DocIO and PDF Conversion - Custom Document properties removed
Hello!
I'm trying to generate a PDF from a Word file using the .NET Core version of DocIO. The docx file I'm using has a lot of Custom Document properties. The problem is that these Custom Document properties are all missing in the generated PDF file.
That is what a page with Custom Document properties look like:
https://www.dropbox.com/s/q15tieit8es4ru6/CustomProperties.JPG?dl=0
https://www.dropbox.com/s/nr002sc0cwyj9cb/CustomProperties2.JPG?dl=0
That is what the result look like:
https://www.dropbox.com/s/ugrlbx8u4zg54du/CustomPropertiesResult.JPG?dl=0
That is what my code looks like:
static void Main(string[] args)
{
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MY_KEY");
string inputFile = "input_file_path";
string outputFile = "Sample Output.docx";
File.Copy(inputFile, outputFile, true);
FileStream fileStream = new FileStream(outputFile, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
WordDocument doc = new WordDocument(fileStream, FormatType.Docx);
DocIORenderer converter = new DocIORenderer();
converter.Settings.AutoDetectComplexScript = true;
converter.Settings.EmbedFonts = true;
converter.Settings.EmbedCompleteFonts = true;
PdfDocument pdfDocument = converter.ConvertToPDF(doc);
FileStream pdfStream = File.Create("output.pdf");
pdfDocument.Save(pdfStream);
pdfDocument.Dispose();
pdfStream.Dispose();
doc.Dispose();
fileStream.Dispose();
}
SIGN IN To post a reply.
6 Replies
DB
Dilli Babu Nandha Gopal
Syncfusion Team
February 27, 2019 11:13 AM UTC
Hi Adrein,
Thank you for contacting Syncfusion support.
We could see the reported issue in the given attachment and suspect that the issue might be document specific i.e., elements in the document. Kindly share us the issue causing Word document which will be helpful for us to provide you a prompt and quick solution.
Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same or send to [email protected] by mentioning this forum ID in subject line. We just need your document to recreate the problem you face.
Regards,
Dilli babu.
AL
Adrien Long
February 27, 2019 03:34 PM UTC
Thank you for the answer.
I have sent a mail to [email protected] with a document to recreate the problem.
Best regards,
Adrien
DB
Dilli Babu Nandha Gopal
Syncfusion Team
February 28, 2019 08:40 AM UTC
Hi Adrien,
Thank you for sharing us the details.
We can reproduce the reported issue with “DOCProperty fields are preserved improperly in Word to PDF conversion”. We suspect this to be defect and analyzing on it. We will update you the further details by 4 March 2019.
Regards,
Dilli babu.
DB
Dilli Babu Nandha Gopal
Syncfusion Team
March 4, 2019 05:07 PM UTC
Hi Adrien,
We have fixed the reported “DocProperty value not preserved properly in Word to PDF” and the patch for the fix can be downloaded from the following link
Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
http://syncfusion.com/Installs/support/patch/16.4.0.52/1134320/F142931/SyncfusionPatch_16.4.0.52_1134320_3042019070835774_F142931.exe
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
http://syncfusion.com/Installs/support/patch/16.4.0.52/1134320/F142931/SyncfusionPatch_16.4.0.52_1134320_3042019070835774_F142931.zip
Please find the NuGet packages from below location:
http://syncfusion.com/Installs/support/patch/16.4.0.52/1134320/F142931/SyncfusionNuget_16.4.0.52_1134320_3042019070835774_F142931.zip
Assembly Version: 16.4.0.52
Installation Directions :
This patch should replace the files “Syncfusion.DocIO.Portable.dll” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\ 16.4.0.52 \precompiledassemblies\16.4.0.52\
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.
Note:
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.
https://www.syncfusion.com/account/license
Disclaimer:
Please note that we have created this patch for version 16.4.0.52 specifically to resolve the issue reported in the forum 142931
If you have received other patches for the same version for other products, please apply all patches in the order received.
This fix will be included in our 2019 Volume 1 release which will be available at end of March 2019.
Please let us know if you have any other questions.
We have fixed the reported “DocProperty value not preserved properly in Word to PDF” and the patch for the fix can be downloaded from the following link
Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
http://syncfusion.com/Installs/support/patch/16.4.0.52/1134320/F142931/SyncfusionPatch_16.4.0.52_1134320_3042019070835774_F142931.exe
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
http://syncfusion.com/Installs/support/patch/16.4.0.52/1134320/F142931/SyncfusionPatch_16.4.0.52_1134320_3042019070835774_F142931.zip
Please find the NuGet packages from below location:
http://syncfusion.com/Installs/support/patch/16.4.0.52/1134320/F142931/SyncfusionNuget_16.4.0.52_1134320_3042019070835774_F142931.zip
Assembly Version: 16.4.0.52
Installation Directions :
This patch should replace the files “Syncfusion.DocIO.Portable.dll” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\ 16.4.0.52 \precompiledassemblies\16.4.0.52\
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.
Note:
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.
https://www.syncfusion.com/account/license
Disclaimer:
Please note that we have created this patch for version 16.4.0.52 specifically to resolve the issue reported in the forum 142931
If you have received other patches for the same version for other products, please apply all patches in the order received.
This fix will be included in our 2019 Volume 1 release which will be available at end of March 2019.
Please let us know if you have any other questions.
Regards,
Dilli babu.
AL
Adrien Long
March 6, 2019 09:49 AM UTC
Hi Dilli,
I followed the recommended approach and tried again.
The DOCPROPERTYs are well preserved in the generated PDF but not the PROPRIETEDOCs ...
Wasn't the patch supposed to fix the PROPRIETEDOC as well?
Thanks,
Adrien
DB
Dilli Babu Nandha Gopal
Syncfusion Team
March 6, 2019 06:24 PM UTC
Hi Adrien,
We have fixed the reported issue which will update PROPRIETEDOC. Please find the document which was generated at our end.
We suspect the patched assembly are not referred properly in your application, so the reported issue is still reproduced at your end. Please remove the assemblies from GAC using Syncfusion Assembly Manager which is available in the Syncfusion Dashboard and also, delete bin and obj folders of the sample. Then install the latest patch assemblies again using the Syncfusion Assembly Manager and ensure the file version of “Syncfusion.DocIO.Base.dll” ends with “225” i.e., is same as 16.4140.0.225 which is referred in your project. This could resolve the issue.
|
|
If you are referring the NuGet, then kindly remove Syncfusion.DocIO.Net.Core folder in C:\Users\{XXX}\.nuget\packages then install the patched NuGet package.
Regards,
Dilli babu.
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
AL Adrien Long
- Feb 26, 2019 09:59 AM UTC
- Mar 6, 2019 06:24 PM UTC