Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1005 Bytes

pdf-module.md

File metadata and controls

37 lines (28 loc) · 1005 Bytes
layout title keywords description breadcrumbText needAutoGenerateSidebar
default-layout
PDF Module
dynamic .net twain, pdf load & save
PDF Module index page
PDF Module
true

PDF Module

How to load a partial number of pages of a PDF in DNT

You can use the codes below to show the partial pages.

m_PDFRasteizer.ConvertMode = Dynamsoft.PDF.Enums.EnumConvertMode.enumCM_RENDERALL;
m_PDFRasteizer.ConvertToImage(@"<Path of the file>", "", 100, this as IConvertCallback);
public void LoadConvertResult(ConvertResult result)
{
     if (result.CurrentPage > 3 && result.CurrentPage < 6) // show the fifth (index 4) and sixth (index 5) pages
        {
         m_ImageCore.IO.LoadImage(result.Image);
        }
}

How to save a PDF with a specific page size

This KB is for Dynamic .NET TWAIN v7.x and higher only.

There is an API called PageSize, please set it like following to change the saved PDF size:

m_Creator.PageSize = Dynamsoft.PDF.Enums.EnumPageSize.A5;