We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to read a Word file as template when export Excel file to PDF

Dear Sir :grinning:

I’ve a issue about:

  1. read Excel file, save as PDF.
  2. Add header/footer on every PDF pages.
  3. Header and footer save in a Word file. (For easy maintaining, it’s a a bit complicated.)

I’m stuck on
How to read a Word file as template when export Excel file to PDF” ?

The header is an image placed on left-top, I try to load *.svg and meet a OOM exception.
Now I use a large size *.png image with small zoom scale, it makes image more sharper.

The footer has a complex layout, with table and floating-color-text.
I tried to solve it with transfer to a image, but the hyperlinked text in it could not be recognized and became clickable.

Any suggestion?

Great thanks and sorry for my poor English. :sweat_smile:

@dpi,
Thank you for your query.

Share your runnable console application, template files, program output files, expected output file created by MS Office or any other third party tool and images showing error for our reference. We will reproduce the scenario here and provide feedback accordingly. Please try to send the simplified code which can be compiled and executed here without any missing reference.

@ahsaniqbalsidiqui
Thank you for your reply. :smile:

Here is a simple draw to show what I want to do ( and what I can do now)
圖片 4.png (6.5 KB)

My test console project is too large, I uploaded to the cloud, plz reference:

note:

  1. I remove the license just in case, our company use 19.1.0 Aspose.Total
  2. All source files are in the {project}\bin\Debug\src\
  • report.xlsm is our raw data
  • header.png & footer.png are grab from word_temp.docx
  1. When the console running finished, files will save to {project}\bin\Debug\exp\

Hope these are helpful and thank you again for your GREAT help. :blush:

@dpi

Thanks for sharing sample project.

We have checked the sample application and would like to share with you that Aspose.Words does not provide the functionality to convert header/footer regions to images. For the sake of implementation, we have logged an investigation ticket as WORDSNET-20509 in our issue tracking system. We will investigate the feasibility of required feature and keep you informed with the status of its availability. Please spare us some time.

On the other hand, you may also adopt another workflow in order to achieve what you require. Please try to follow below steps:

In case you need further assistance or face any issue, please feel free to let us know.

Hi @asad.ali

Thank you for your reply. :blush:

I’ll try the workflow you suggestion.