개정판 7aa36857
issue #937: 사용자가 Comment한 위치가 아닌 다른 곳에 Comment가 생성되는 현상 수정
Change-Id: I612de59d2568963d5e68557e7854a4437be3e8a3
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs | ||
---|---|---|
473 | 473 |
mediaBox = pdfReader.GetPageSize(markupItem.PAGENUMBER); |
474 | 474 |
var cropBox = pdfReader.GetCropBox(markupItem.PAGENUMBER); |
475 | 475 |
|
476 |
if (cropBox != null && cropBox.Width < mediaBox.Width || cropBox.Height < mediaBox.Height) |
|
476 |
/// media box와 crop box가 다를 경우 media box를 crop box와 일치시킨다 |
|
477 |
if (cropBox != null && |
|
478 |
(cropBox.Left != mediaBox.Left || cropBox.Top != mediaBox.Top || cropBox.Right != mediaBox.Right || cropBox.Bottom != mediaBox.Bottom)) |
|
477 | 479 |
{ |
480 |
PdfDictionary dict = pdfReader.GetPageN(markupItem.PAGENUMBER); |
|
481 |
|
|
482 |
PdfArray oNewMediaBox = new PdfArray(); |
|
483 |
oNewMediaBox.Add(new PdfNumber(cropBox.Left)); |
|
484 |
oNewMediaBox.Add(new PdfNumber(cropBox.Top)); |
|
485 |
oNewMediaBox.Add(new PdfNumber(cropBox.Right)); |
|
486 |
oNewMediaBox.Add(new PdfNumber(cropBox.Bottom)); |
|
487 |
dict.Put(PdfName.MEDIABOX, oNewMediaBox); |
|
488 |
|
|
478 | 489 |
pdfSize = cropBox; |
479 | 490 |
} |
480 | 491 |
scaleWidth = float.Parse(currentPage.PAGE_WIDTH) / pdfSize.Width; |
... | ... | |
1098 | 1109 |
return true; |
1099 | 1110 |
} |
1100 | 1111 |
} |
1101 |
catch (Exception) |
|
1112 |
catch (Exception ex)
|
|
1102 | 1113 |
{ |
1103 |
throw; |
|
1114 |
throw ex;
|
|
1104 | 1115 |
} |
1105 | 1116 |
return false; |
1106 | 1117 |
} |
내보내기 Unified diff