Export PDF - add header

Hi, i want to know if it’s possible to add and custom header in a project export in PDF format.
Myabe we can use in complement Aspose.PDF:
-> by adding a margin i the project export and then add the custom header with Aspose.PDF

@Rag3lib,

Thank you for contacting Aspose support team.

Please give a try to the following sample code and share the feedback. If it is not according to your requirements, send us the sample project file and output PDF file created by MS Project for our analysis. We will review these files and provide assistance accordingly.

Project project = new Project(@"Blank2010.mpp");

// Customize table by adding text attribute field
TableField attrField = new TableField();
attrField.Field = Field.TaskText10;
attrField.Width = 20;
attrField.Title = "New Id";

Aspose.Tasks.Table table = project.Tables.ToList()[0];
table.TableFields.Insert(table.TableFields.Count, attrField);

Aspose.Tasks.Task task = project.RootTask.Children.Add("New Activity 1");
ExtendedAttribute attr = new ExtendedAttribute();
attr.FieldId = ((int)ExtendedAttributeTask.Text10).ToString();
attr.Value = "98484";
task.ExtendedAttributes.Add(attr);

Aspose.Tasks.Task task2 = project.RootTask.Children.Add("New Activity 2");
ExtendedAttribute attr2 = new ExtendedAttribute();
attr2.FieldId = ((int)ExtendedAttributeTask.Text10).ToString();
//attr2.Value = "98483";
task2.ExtendedAttributes.Add(attr2);

task2.ExtendedAttributes.Where(x => x.FieldId ==
                                    ((int)ExtendedAttributeTask.Text10).ToString()).FirstOrDefault().Value = "98485";
MPPSaveOptions mppSaveOptions = new MPPSaveOptions();
mppSaveOptions.WriteViewData = true;
project.Save(@"Project1.mpp", mppSaveOptions);
project.Save(@"Project1.pdf", SaveFileFormat.PDF);

Thanks for you answer but unfortunately it’s not my requirement.
When i speak about “header” i speak about adding a space before the gantt table on each page (see the image attached the this post).

By the way, i want to know if it’s possible to change the language used in the gantt component exported for having days name and months in french (i put my request in the image too).

exemple.png (29.6 KB)

Thx

@Rag3lib,

We are working over this query and will soon update you with our findings.

@Rag3lib,

We have tried to add header but seems it is not possible. Please provide us steps to perform same steps using MS Project and saving output to PDF. We will analyze it and provide assistance to perform the same using Aspose.Tasks.

Regarding changing the language for day and month names, we are afraid that it is not possible.

template.zip (33.1 KB)

You can find attach to this post a mpp template with a custom header before the Gantt chartt (you can view this in View panel -> print preview).
Can you please tell me if it’s possible to insert variables values (like doc builder in Aspose.Word).

After that, i try an export to PDF format, and the timeline header is completly destructured (see the image below)
exemple.png (11.5 KB)

And i expect something like this;
expectation.PNG (4.0 KB)

for the timeline language, can you tell me if it will be a futur feature in next product release.

@Rag3lib,

We have analyzed your requirements and following are our findings about these.

  1. Include Header in output PDF - This is not possible right now and has been logged as TASKSNET-2600 for further consideration at our end.

  2. Change language - This is also not possible and has been logged as TASKSNET-2601 for further consideration.

  3. Days overlapping in Timeline - This has been logged for improvement as TASKSNET-2602 for further consideration at our end.

Regarding possible usage of Aspose.Word API in this regard, we request you to please post your inquiry Aspose.PDF or Aspose.Words forum for further assistance in this regard.

Thank you for taking into account my requests. These requests are urgently needed for my project. So, is it possible to have a release date estimation (one month, six months, one year?). To know, roughly, when these features will be available.

@Rag3lib,

The issue has been logged too recently and there is no information available about the availability of these features. We’ll update you here once there is some information available in this regard.

Hi, can you give me a resolution date?
specially about the TASKSNET-2601 bug ? because it’s a requirement for our application.

@Rag3lib

Thank you for writing back to us.

This issue shall be resolved with Aspose.Tasks for .NET 19.2 release, which shall probably be available in the first week of February 2019.

Hi,

you say to me that the fix will be available for the 19.2 release. But, in the release note, bugs are not referenced.
Theses bug are criticals for our needs, can you provide provide a resolution date.

Thanks
Gabriel

@Rag3lib,

I like to share that associated issues with this thread are still unresolved at the moment. We request for your patience and will share automatic notification with you once the issues will be fixed.

The issues you have found earlier (filed as TASKSNET-2600,TASKSNET-2602) have been fixed in this update.