You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > PDF Creation > TWAIN Acquisition To PDF & PDF/A > TwainPdfStartStream > TwainPdfStartStream Method (Stream, Boolean, String, String, String, String, String)
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.TwainPdfStartStream Method (Stream, Boolean, String, String, String, String, String)

Creates an empty PDF stream in order to transfer multiple page using the TwainAddGdPictureImageToPdf() until the TwainPdfStop() function is called.

C#
public int TwainPdfStartStream(
    ref Stream PDFStream, 
    Boolean PDFA, 
    String Title, 
    String Author, 
    String Subject, 
    String Keywords, 
    String Creator
);
Visual Basic
Public Function TwainPdfStartStream(
    ByRef PDFStream As Stream, 
    ByVal PDFA As Boolean, 
    ByVal Title As String, 
    ByVal Author As String, 
    ByVal Subject As String, 
    ByVal Keywords As String, 
    ByVal Creator As String
) As Integer
Parameters
Parameters 
Description 
PDFStream 
The Stream object to save the PDF.  
PDFA 
True to generate PDF in PDF/A format else False.  
Title 
The title of the PDF.  
Author 
The PDF Author.  
Subject 
The PDF Subject.  
Keywords 
The PDF Keywords.  
Creator 
The name of the application which creates the PDF.  
Returns

0: The PDF could not created. Use the GetStat() function to determine the reason this function failed. 

Non-zero: A PDF Identifier.

How to scan pages of a document feeder to a multipage PDF/A file.

Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer
Dim PDFStream As IO.Stream = New IO.MemoryStream
Dim bContinue As Boolean = True
Dim PdfID As Integer
 
oGdPictureImaging.SetLicenseNumber("XXX") 'Replace XXX by a demo or commercial license key
 
 
oGdPictureImaging.TwainOpenDefaultSource(Me.Handle)
oGdPictureImaging.TwainSetAutoFeed(True)
oGdPictureImaging.TwainSetAutoScan(True)
 
PdfID = oGdPictureImaging.TwainPdfStartStream(PDFStream, True, "", "", "", "", "")
If PdfID <> 0 Then
   While bContinue
         ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(Me.Handle)
         oGdPictureImaging.TwainAddGdPictureImageToPdf(PdfID, ImageID)
         oGdPictureImaging.ReleaseGdPictureImage(ImageID)
         bContinue = (oGdPictureImaging.TwainGetState > TwainStatus.TWAIN_SOURCE_ENABLED)
   End While
   oGdPictureImaging.TwainPdfStop(PdfID)
End If
oGdPictureImaging.TwainCloseSource()
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.