Hi,
I am using DynamicPDF 6.0 (Licensed version) to convert my text document to pdf.
I am using following method to create a pdf document.
private FormattedTextArea AddTextToDocument(ceTe.DynamicPDF.Document document, FormattedTextArea formattedTextArea, ceTe.DynamicPDF.Page page)
{
// Add left column FormattedTextArea to page
if (formattedTextArea != null)
{
page.Elements.Add(formattedTextArea);
}
// Add page to document
document.Pages.Add(page);
// Return the next FormattedTextArea if there is overflow text
if (formattedTextArea == null)
{
return null;
}
else
{
return formattedTextArea.GetOverflowFormattedTextArea(0, 60);
}
}
I found that the Generated PDF does not contain the full document. it gets truncated so the last page does not have the remaining document content. Please help me.
Document gets truncated at end after converting to PDF
Re: Document gets truncated at end after converting to PDF
Support · Nov 4, 2011Hello,
It looks like there might be something wrong with the logic you have for adding the overflow formatted text area to the new page. We can not say exactly by seeing the method you gave here. However you can refer to the Text Continuation
example in our help documentation and modify the code for achieving this task. The above example is for TextArea element, however you can use the FormattedTextArea also in similar way.
If you still have any problems please feel free to contact our [^a|mailto:support@cete.com|support@cete.com^].
Thanks,
ceTe Software Support Team.
Re: Document gets truncated at end after converting to PDF
Forum member · Nov 4, 2011I caught it where the issue is. The issue is, if the document contains special char like "<" then when you convert it to PDF it gets truncated exactly at that place. I checked it by just replacing the char "<" with <blank space> and it worked.
Now my worry is, what all chars are there which Dynamic PDF Control is not supporting.
Please send me the list of that or let me know whether my fact finding is correct or not.
Re: Document gets truncated at end after converting to PDF
Support · Nov 4, 2011Hello,
Are you trying to add HTML text to the PDF document? The FormattedTextArea is used to add HTML text to the PDF. The "<" symbol will be present in HTML tags and it might be trying to parse the symbol.
If you are not adding the HTML text then you can use the TextArea page element instead of the FormattedTextArea element.
You can also refer to the supported HTML tags
on our help documentation.
Thanks,
ceTe Software Support Team.
Re: Document gets truncated at end after converting to PDF
Forum member · Nov 4, 2011Issues solved by using TextArea instead of FormattedTextArea.
Thanks for the quick response.