'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.Collections.GenericImportsSystem.LinqImportsGrapeCity.Documents.PdfImportsGrapeCity.Documents.Text '' This sample provides a number of forms that can be filled'' And saved Or printed right in the sample browser'' using the 'save' or 'print' buttons in DsPdfViewer.'''' Note that if you print the filled form, everything Is done'' in the client browser, no data Is sent to our demo server.'' But if you click the 'save' button, the entered data along with'' the original form are sent to the demo server. The server uses DsPdf'' to insert the data into the PDF, And sends the filled PDF form'' back to the client. The demo server neither stores nor analyzes'' the data.'''' Note also that the viewer's 'download' button will only download'' the original form without the data. Unlike the 'save' button, 'download''' does Not access the server, it only gets the original PDF that was loaded'' into the viewer.PublicClassFillForms'' By default, generate the first form:PublicSubCreatePDF(ByVal stream AsStream, OptionalByVal paramsIdx AsInteger = 0)CreatePDF(stream, GetSampleParamsList()(paramsIdx))EndSub PublicSubCreatePDF(ByVal stream AsStream, ByVal sampleParams AsString())Dim fn = sampleParams(3)Dim pn = Path.Combine("Resources", "PDFs", "Forms", "misc", fn)Using fs = File.OpenRead(pn) fs.CopyTo(stream)EndUsingEndSub PublicSharedFunctionGetSampleParamsList() AsList(OfString())'' Strings are name, description, info, rest are arbitrary strings:ReturnNewList(OfString()) From {NewString() {"@us-tax-forms/Form W-7", "Application for IRS Individual Taxpayer Identification Number", Nothing, "fw7-demo.pdf"},NewString() {"@us-tax-forms/Form SS-4", "Application for Employer Identification Number", Nothing, "fss4-demo.pdf"},NewString() {"@e-com-forms/Goods Return", "Goods Return and Exchange Form", Nothing, "goods-return-form.pdf"},NewString() {"@hr-forms/Time Sheet", "Time Sheet Form", Nothing, "time-sheet-form.pdf"},NewString() {"@hr-forms/Trip Permission", "Offsite field trip permission slip", Nothing, "offsite-field-trip-form.pdf"},NewString() {"@member-forms/Health Info", "Health Info Intake Form", Nothing, "health-intake-form.pdf"},NewString() {"@event-forms/Event Feedback", "Event Feedback Form", Nothing, "event-feedback-form.pdf"} }EndFunctionEndClass