Skip to main content
Participant
April 18, 2024
Question

C# 코드로 PDF를 JPG로 추출할 때, 클립보드 데이터를 가져오지 못하는 버그 수정 요청(최신 버전)

  • April 18, 2024
  • 1 reply
  • 249 views

.NET Program에서 Acrobat dc 2015를 이용해서 PDF, AI 파일을 JPG로 추출하고 있습니다.

새 버전의 경우 클립보드의 데이터를 가져 오지 못해서 사용하지 못하고 있습니다.

코드 보여드리겠습니다.

 

Acrobat.AcroPDPage pdfPage = (Acrobat.AcroPDPage)pdfDoc.AcquirePage(currentPage);
Acrobat.AcroPoint pdfSize = (Acrobat.AcroPoint)pdfPage.GetSize();
Acrobat.AcroRect pdfRect = new Acrobat.AcroRect();
pdfRect.Left = 0;
pdfRect.right = (short)(pdfSize.x * 180 / 100);
pdfRect.Top = 0;
pdfRect.bottom = (short)(pdfSize.y * 180 / 100);
bool copy = pdfPage.CopyToClipboard(pdfRect, 0, 0, 180);
IDataObject clipboardData = Clipboard.GetDataObject();  //return null

clipboardData에 null 이 반환됩니다.(오류)

if (clipboardData.GetDataPresent(DataFormats.Bitmap)) // return false
{
Bitmap pdfBitmap = (Bitmap)clipboardData.GetData(DataFormats.Bitmap);
Image originImage = Image.FromHbitmap(pdfBitmap.GetHbitmap());

SaveImage(originImage);

pdfBitmap.Dispose();
originImage.Dispose();
modifiedBitmap.Dispose();
}

최신 버전입니다. (24.2.20687.0)

프로그램 버그로 생각됩니다.

확인후 수정해 주기 바랍니다.

This topic has been closed for replies.

1 reply

FormatioIN
Community Manager
Community Manager
April 18, 2024

아쉽지만,  Acrobat 2015의 기술 지원은 종료되어서 현재 추가 업데이트가 어려운 상태입니다.

▶관련 문서 : Adobe Acrobat Classic 2015 및 Acrobat Reader Classic 2015 지원 종료

Participant
April 19, 2024

이건 새 버전에서도 제대로 작동해야 하는 기능입니다. 

버그입니다.

FormatioIN
Community Manager
Community Manager
April 19, 2024

새 버전이라고 하시면 Acorbat Pro / Standard 24.1 버전을 말씀하시는 건가요 ?