Is It Possible To Print To A Pdf Without Having To Use A Pdf Print Driver? フォローする

0
Avatar
Legacy Poster

Hi Everybody,

I am trying to convert .btw file to pdf without using PDF Print Driver. pdf file is created when i am trying to open it is opening.

please anybody help me.

 

Thanks in advance.

 

10 コメント

0
Avatar
Shotaro Ito
コメントアクション Permalink

From BarTender's File > Export Image, you can save label image as PDF, however the image quality may not good as expected.

I would use PDF Print driver such as Bullzip.

0
Avatar
Legacy Poster
コメントアクション Permalink

Thanks for ur reply.

 

For Export Image Functionality we can Generate PDF,But it should be editable.Please give some Coding Suggestion.

0
Avatar
Legacy Poster
コメントアクション Permalink

I am Using this code.

 

 

 protected void Button1_Click(object sender, EventArgs e)
    {
        BarTenderPrintClient.Printer printClient = new BarTenderPrintClient.Printer();
        Dictionary<string, string> FormatFieldValues = new Dictionary<string, string>();
 
        // Create a new print to file license key
        string printLicense = null;
        bool success;
 
        success = printClient.CreatePrintToFileLicense("Bullzip PDF Printer", out printLicense);
        if (success)
        {
            Engine btEngine = new Engine();
            //NPIA079F8 (HP LaserJet 100 colorMFP M175nw)
            // Start a BarTender print engine
            btEngine.Start();
            // Open a label format
            LabelFormatDocument btFormat = btEngine.Documents.Open(@"D:\Hazardous_LOCTITE_163953974807_419.btw");
            // Set the TextFile database connection file name
           // ((TextFile)btFormat.DatabaseConnections[""]).FileName = @"C:\Users\Admin\Desktop\Labels\FIMS055.txt";
             string[] substrings = btFormat.SubStrings.GetAll(",", "/").Split('/');
             if (substrings.Length > 0)
             {
                 foreach (string keyValuePair in substrings)
                 {
                     if (keyValuePair.Trim().Length > 0)
                     {
                         string replaceValue = string.Empty;
                         FormatFieldValues.TryGetValue(keyValuePair.Split(',')[0].Trim(), out replaceValue);
                         btFormat.SubStrings.SetSubString(keyValuePair.Split(',')[0].Trim(), replaceValue);
                     }
                 }
 
             }
 
            //Assign printer name
             btFormat.PrintSetup.PrinterName = "Bullzip PDF Printer";
            // Set the print license
            btFormat.PrintSetup.PrintToFileLicense = printLicense;
 
 
            // Set print to file to true
            btFormat.PrintSetup.PrintToFile = true;
 
            // Specify the name of the output file
            btFormat.PrintSetup.PrintToFileName = @"C:\Users\PAVAN\Desktop\Labels\PrintFile.pdf";
 
            Messages mess=new Messages();
 
            // Print the label format document
            Result result = btFormat.Print("testprint", out mess);
 
            // Stop the engine
            btEngine.Stop();
 
        }
    }
}
0
Avatar
Legacy Poster
コメントアクション Permalink

The PDF is generating in the local drive but when i trying to open it was crashed

0
Avatar
Legacy Poster
コメントアクション Permalink

And i dont want to use Third party PDF Printer Driver.

 

Thanks

0
Avatar
Legacy Poster
コメントアクション Permalink

I am using the bartender to creating new pdf for my college for checking. And there is big issue to naming the files. Could I use Vb script to creating files name from excel data base? Please help.
0
Avatar
Shotaro Ito
コメントアクション Permalink

Label image exported as PDF is image, so that's not editable by Adobe acrobat.

As we're not Adobe, we use 3rd party PDF export tool too and that may not match the quality you expected.

You can use Adobe's PDF printer from adobe, however that's not as simple as before.

 

About filename,

Often, PDF printer uses print job name as filename.

You cannot change job name from VB Script within BarTender though.

This topic might gives you some idea.

http://forums.seagullscientific.com/index.php?/topic/3990-automated-file-naming-for-pdf-printing/

0
Avatar
Legacy Poster
コメントアクション Permalink

Is it possible to generate PDF without using that  Adobe's PDF Printer in Automation of BarTender .NET SDK.

 

 

Thank u

0
Avatar
Legacy Poster
コメントアクション Permalink

we are using bullzip printer for generating PDF files. But for printing we are using Zebra 170xi4 300DPI printer. The .btw file has zebra printer fonts so when we download PDF using bullzip printer, bullzip printer replacing zebra printer font with 'Arial' causing some alignment issues. Please suggest me how we can fix this.

0
Avatar
Legacy Poster
コメントアクション Permalink

We are using adobe pro for the printer driver. What we are doing being complicated special files names with a data base specified sequence (which the file name could combine the data from the excel file data field. Is the OnSave comment on Print comment could getting a msg box content with the data combination and then as saving processing and naming the file at the same time. Please advise.

サインインしてコメントを残してください。