I created a script to export PDFs for a customer, and they've requested the pages be scaled to 8.5x11 when the PDF export happens. There are documents where (strangely) the different pages are of different sizes, so the first page is 8.5x11, but second page and a few others are smaller or larger than that.
I found a property for DocumentExporter that sets the page size, and the enumeration for 8.5x11, but it doesn't seem to be working. The pages are all still different sizes.
namespace WorkflowActivity.Scripting.ScriptToExportPDFOfDocument { using System; using Laserfiche.RepositoryAccess; using Laserfiche.DocumentServices; /// <summary> /// Provides one or more methods that can be run when the workflow scripting activity is performed. /// </summary> public class PdfExport : RAScriptClass102 { /// <summary> /// This method is run when the activity is performed. /// </summary> protected override void Execute() { //Use the full PDF file path created in PDF Full Export FIle Path token string fullFilePath = GetTokenValue("PDF Full Export File Path").ToString(); //Create Document Info object to feed current entry DocumentInfo sDoc = (DocumentInfo)this.BoundEntryInfo; //Lock Current Entry //sDoc.Lock(LockType.Exclusive); //Create a document exporter DocumentExporter dExp = new DocumentExporter(); dExp.IncludeAnnotations = true; dExp.PdfPageSize = 0; //Export the PDF try { dExp.ExportPdf(sDoc, sDoc.AllPages,PdfExportOptions.RenderAnnotationsAsImage, fullFilePath); } catch (Exception ex) { throw new LaserficheRepositoryException ("Pdf export script failed to export the PDF.", ex); } //Release the Source Document //sDoc.Unlock(); //sDoc.Dispose(); } } }