Free Support Forum - aspose.com

Howto load a document- make changes and export to pdf?

hello everybody,

I am new to ASPOSE and a little bit confused with all the doc available here.

Here is what I would like to do:
I have a doc file already present in a directory
I want to add lines numbers to this file and then save the result to a new pdf file.

Here is the code I use but something must be wrong since I don’t get lines numbers in the pdf file :frowning:

Public Function CreatePDFFromDoc(ByVal docFile As String, ByVal pdfFile As String) As String

Try
Dim doc As New Aspose.Words.Document(docFile)

For Each sect As Aspose.Words.Section In doc.Sections
sect.PageSetup.LineNumberRestartMode = LineNumberRestartMode.Continuous
sect.PageSetup.LineNumberCountBy = 1
sect.PageSetup.LineStartingNumber = 1
Next
doc.Save(“tmp.xml”, SaveFormat.AsposePdf)

Dim pdf As New Aspose.Pdf.Pdf
pdf.BindXML(“tmp.xml”, Nothing)
pdf.IsImagesInXmlDeleteNeeded = True
pdf.Save(pdfFile)

Return “”
Catch ex As Exception
Return ex.Message
End Try

End Function

rem: if I save to another word file, I get the line numbers!

Thank you for your help

Yvan

I realize that line numbers, even if added in the word document, are not kept during the conversion to PDF. It’s a big issue for me since my client absolutely needs this feature!

What am I doing wrong???

yvan

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Auto line numbering is not supported upon converting to PDF. This is the known issue #7241 in our defect database. I will notify you as soon as it is fixed.

Best regards.

Thank you for your quick response.
Do you have an idea when this feature will be available?
best regards

Yvan

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately, I cannot provide you any reliable estimate at the moment. Hopefully, this feature will be supported in Q2 2009, but I cannot promise anything.

Best regards.

Hi

Anything new about this new feature I really need?

thank you very much, best regards
Yvan

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately, “Auto Line Numbering” feature is still unavailable. You will be notified as soon as this feature is implemented.

Best regards.

Hi Alexey,

anything new about this?

best regards

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately, this feature is still unsupported.

Best regards.

The issues you have found earlier (filed as 7241) have been fixed in this update.


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