.net Sdk Pdf Printing S’abonner

0
Avatar
Legacy Poster

Hi,

 

 

Env: automation 10.1, win 7, Oracle 12

 

 

Can you help to see if bartender sdk can achieve this?

• create a barcode on bartender app (btw)
• custom script will create barcode info and save in the database
• connect to the database to get barcode(s) info and print a single pdf file
• transfer pdf file to client and print

What I did so far:
• able to create a barcode on bartender app
• able to customize the script to create barcode info and save in the database
• not sure how to connect to Oracle DB, do a select query and print to a single pdf file
• able to transfer pdf file to client and print

 

Better yet, for barcode info can we avoid any data source connection and load all barcode info into memory? I notice we can use “Substrings”, but it can only create one btw and print out one pdf.  You can do identical copies but not different data on each btw and print to single pdf.

 

Here is what I have for text file….

 

engine = new Engine(true);
            format = engine.Documents.Open("C:\\ 3.btw");
            TextFile textFile = new TextFile("Container");

            textFile.FileName = @"C:\Container2.dat";

            format.DatabaseConnections.SetDatabaseConnection(textFile);

            format.PrintSetup.PrinterName = "PDFCreator";

            Messages messages;
            int waitForCompletionTimeout = 10000; // 10 seconds
            Result result = format.Print(appName, waitForCompletionTimeout, out messages);

            engine.Stop(SaveOptions.DoNotSaveChanges);

Response.ClearHeaders();
            Response.ContentType = "application/pdf";
            Response.Clear();
            Response.AppendHeader("Content-Disposition", "inline");
            Response.TransmitFile("Label.pdf");
            Response.End();

 

 

 

 

Thanks,

 

Tim

Vous devez vous connecter pour laisser un commentaire.