Rank: Newbie
Groups: Registered
Joined: 3/3/2017(UTC) Posts: 5   Thanks: 2 times
|
Im trying to split a document and i'm getting an "unexpected error code" in ImportPages method. This is my code: Code:
foreach (KeyValuePair<PdfDocument, List<String>> documentSplitInfo in documentsSplitInfo)
{
PdfDocument document = documentSplitInfo.Key;
foreach (String splitInfo in documentSplitInfo.Value)
{
try
{
PdfDocument newDocument = PdfDocument.CreateNew();
newDocument.Pages.ImportPages(document, splitInfo, 0);
String newPath = Path.Combine(Util.GetNeodocOutloocAddinTempForlder(), document.Title);
newDocument.Save(newPath, Patagames.Pdf.Enums.SaveFlags.Incremental);
}
catch (System.Exception ex)
{
Logging.LogUtils.WriteLog(Logging.LogLevel.ERROR, ex);
}
}
}
document is a PdfDocument, not null splitInfo is a String with the pages to split. Exception Info: Code:2017-03-06 13:27:23 [ERROR] - Excepción
Mensaje: Unexpected error code.
Exception:
System.Exception ProcessLastError()
Data:
StackTrace:
at Patagames.Pdf.Pdfium.ProcessLastError()
at Patagames.Pdf.Net.PdfPageCollection.ImportPages(PdfDocument sourceDoc, String pagerange, Int32 index)
Any idea that what´s happening? Thanks. Edited by user 8 years ago
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,116
Thanks: 8 times Was thanked: 130 time(s) in 127 post(s)
|
|
 1 user thanked Paul Rayman for this useful post.
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close