- Home
- Forum
- ASP.NET MVC
- When converting from word document to pdf, footer is nowhere to be found
When converting from word document to pdf, footer is nowhere to be found
Hello
Attachment: RevisionesAdministrativasMultiples_e37a0bdf.rar
Every time that I think I got something right, something happens lol... argh!
Now I am trying to simply convert a word document to a pdf and render it to the browser. When I do so, the converted PDF doesn't has the word document footer.
Now I am trying to simply convert a word document to a pdf and render it to the browser. When I do so, the converted PDF doesn't has the word document footer.
Here is my method:
private int ConvertShowPDF(WordDocument RevisionWordDocument)
{
RevisionWordDocument.ChartToImageConverter = new ChartToImageConverter();
DocToPDFConverter converter = new DocToPDFConverter();
try
{
PdfDocument pdfDocument = converter.ConvertToPDF(RevisionWordDocument);
MemoryStream pdfStream = new MemoryStream();
pdfDocument.Save(pdfStream);
HttpContext.Current.Response.ContentType = "application/pdf";
HttpContext.Current.Response.AddHeader("content-disposition", "inline; filename=RevisionesAdministrativas.PDF");
HttpContext.Current.Response.AddHeader("content-length", pdfStream.Length.ToString());
HttpContext.Current.Response.BinaryWrite(pdfStream.ToArray());
HttpContext.Current.Response.End();
pdfDocument.Close();
RevisionWordDocument.Save(HttpContext.Current.Server.MapPath("~/App_Data/Edited.docx"), FormatType.Docx);
RevisionWordDocument.Close();
return 0;
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
return 1;
}
}
I attached to this message a copy of the word document.
What I am doing wrong?? This is some kind of bug? Help please. Thank you!
Attachment: RevisionesAdministrativasMultiples_e37a0bdf.rar
SIGN IN To post a reply.
4 Replies
SO
Samuel Otero
August 9, 2017 12:13 AM UTC
I changed the footer of the document for a picture and now it works. I wonders what special thing the past footer has that can't be converted to the PDF. Please clarify. Thank you
MJ
Mohanaselvam Jothi
Syncfusion Team
August 9, 2017 11:33 AM UTC
Hi Samuel,
Thank you for using Syncfusion products.
Currently DocIO doesn’t provide support for grouped shapes preservation in Word to PDF conversion. We have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases and we don’t have any immediate plans to implement this feature. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.
As a work-around kindly modify the group shape as ungroup shape in the input Word document thereby it will be preserved properly in the PDF document. We have modified your Word document with image. Please find the modified document from below link.
Thank you for using Syncfusion products.
Currently DocIO doesn’t provide support for grouped shapes preservation in Word to PDF conversion. We have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases and we don’t have any immediate plans to implement this feature. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.
As a work-around kindly modify the group shape as ungroup shape in the input Word document thereby it will be preserved properly in the PDF document. We have modified your Word document with image. Please find the modified document from below link.
Modified document link:
http://www.syncfusion.com/downloads/support/forum/132027/doc/RevisionesAdministrativas-Multiples_Modified-139642195.docx
Please let us know if you have any other questions.
Regards,
Mohanaselvam J
SO
Samuel Otero
August 11, 2017 03:19 PM UTC
Hello and thanks for your reply
Your modified document has the blue box of the footer with white font on the letters. That's ok and that's how it should look. But when I convert your document to PDF, the font on the blue box is black and I can barely see it. Why this happens? Please help.
MJ
Mohanaselvam Jothi
Syncfusion Team
August 14, 2017 08:42 AM UTC
Hi Samuel,
Thank you for using Syncfusion products.
A support incident to track the status of your query has been created under your account. Please log on to our support website to check for further updates,
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you have any other questions.
Regards,
Mohanaselvam J
Thank you for using Syncfusion products.
A support incident to track the status of your query has been created under your account. Please log on to our support website to check for further updates,
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you have any other questions.
Regards,
Mohanaselvam J
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
SO Samuel Otero
- Aug 8, 2017 11:16 PM UTC
- Aug 14, 2017 08:42 AM UTC