Skip to content

Commit

Permalink
Draw annotations for PDF rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Sep 2, 2023
1 parent 96e3fe8 commit 0ee3555
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NAPS2.Sdk/Pdf/Pdfium/PdfBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void FillRect(int x, int y, int width, int height, uint color)
public void RenderPage(PdfPage page, int x, int y, int width, int height)
{
int rotate = 0;
int flags = PdfiumNativeLibrary.FPDF_PRINTING;
int flags = PdfiumNativeLibrary.FPDF_PRINTING | PdfiumNativeLibrary.FPDF_ANNOT;
Native.FPDF_RenderPageBitmap(Handle, page.Handle, x, y, width, height, rotate, flags);
}
}
1 change: 1 addition & 0 deletions NAPS2.Sdk/Pdf/Pdfium/PdfiumNativeLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ internal class PdfiumNativeLibrary : Unmanaged.NativeLibrary
public const int FPDFBitmap_BGR = 2;
public const int FPDFBitmap_BGRA = 4;

public const int FPDF_ANNOT = 0x01;
public const int FPDF_PRINTING = 0x800;
public const int FPDF_REVERSE_BYTE_ORDER = 0x10;

Expand Down

0 comments on commit 0ee3555

Please sign in to comment.