Skip to main content

Lasernet Cloud Print Connector 1.2: LNEMF Print - Knowledgebase / Lasernet FO Connector / Lasernet FO Connector FAQs - Formpipe Support Portal

Lasernet Cloud Print Connector 1.2: LNEMF Print

Authors list

Cloud Print Connector now includes the option to print LNEMF files which do not require installing different printer drivers (brands) on the Lasernet server.

The following formats are supported through Cloud Print Connector:

Format

Description

PDF

Used when re-printing documents from the Lasernet Archive or when printing attachments.

RAW

When using the EMF to RAW (Cloud Print Driver) module in Lasernet – requires the different printer drivers/brands to be installed at the Lasernet Server.

LNEMF (EMF)

Used when printing directly from the Form/Print-sheet and does not require the different printer drivers/brands to be installed at the Lasernet Server (printer independent).


Global JobInfo

An additional global JobInfo is introduced in the standard demo setup to identify whether RAW or LNEMF is to be used for printing.

EnableLNEMFPrinting

Printing the LNEMF (EMF) files requires adjustments to the Lasernet configuration.

The EMF to RAW module is skipped, and documents can get passed directly from a print sheet (Form) into the Azure Storage Printer (storage used by Cloud Print Connector).

It is important to encode (Base64 Encode) the document (LNEMF) before parsing it to Azure Storage Printer. ZIP is not currently supported when printing the LNEMF files, but it would significantly reduce the file size once introduced.

Such information as Orientation, Paperwidth, Paperheight, copies, etc. is added to Pre JobInfos at Azure Storage Printer which contains the contract for Cloud Print Connector.


Printer Contract

The printer contract value is found in Pre JobInfos > xmlPrinterSettings > Value:

<PrinterSettings xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">


<a:KeyValueOfstringstring>

<a:Key>PaperSource</a:Key>
<a:Value>#PaperSource#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>Copies</a:Key>
<a:Value>#Copies#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>Orientation</a:Key>
<a:Value>#Orientation#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>PaperHeight</a:Key>
<a:Value>#PaperHeight#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>PaperWidth</a:Key>
<a:Value>#PaperWidth#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>PrintQuality</a:Key>
<a:Value>#PrintQuality#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>ColorMode</a:Key>
<a:Value>#ColorMode#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>DuplexMode</a:Key>
<a:Value>#DuplexMode#</a:Value>

</a:KeyValueOfstringstring>

</PrinterSettings>

And for follow-me print (WinPrintNotifyName, WinPrintUserName)

<a:KeyValueOfstringstring>

<a:Key>WinPrintNotifyName</a:Key>
<a:Value># WinPrintNotifyName#</a:Value>

</a:KeyValueOfstringstring>

<a:KeyValueOfstringstring>

<a:Key>WinPrintUserName</a:Key>
<a:Value>#WinPrintUserName#</a:Value>

</a:KeyValueOfstringstring>


Supported Printer Properties

  • FormName

  • Orientation (landscape or portrait)

  • PaperWidth

  • PaperHeight

  • Scale

  • Copies

  • PaperSource (number, or a paper sources, like "Tray 1")

  • PrintQuality

  • ColorMode (color or monochrome)

  • DuplexMode (simplex, horizontal or vertical)


LNEMF

PDF

RAW

FromPage/ToPage

Supported [1]

Supported

Not supported [3]

PrinterSettings

Copies/duplex/PaperSource etc.

Supported

Supported [2]

Not supported [4]

Follow me

WinPrintUserName/WinPrintNotifyName

Supported

Currently not supported [5]

Supported

[1] If the printer supports it.

[2] But looks like the settings are only used for rendering and not actually being sent to the printer.

Ex.: if copies are 2, then two prints are printed, however, the printer only sees one copy.

[3] Requires that we either parse the RAW data, or Lasernet splits the commands into pages, i.e. create an LNRAW contract like LNEMF.

[4] The printer expects settings to be part of data (commands), so settings are ignored.

[5] Print job id is not returned, so requires additional work.


Scripts

EnableLNEMFPrinting is used within the LAC function:

MicrosoftTeams-image (5).png

The script within the Lasernet Connector function

}

// Need to Base64 encode JobData when printing allowed LNEMF
else if ((prefix.toLowerCase()=='Output'.toLowerCase() || prefix.toLowerCase()=='CustomOutput'.toLowerCase()) &&

job.getJobInfo('DataFormat').toLowerCase() ==’EMF' .toLowerCase() &&
job.getJobInfo('EnableLNEMFPrinting').toLowerCase() == 'Yes'.toLowerCase()) // when main file

{

if (job.getJobInfo(prefix+'JobDataEncoded').toLowerCase() != 'Yes'.toLowerCase())
{

logger.logEvent(0, 'Base64 Encoding main');
job.setJobData(Base64.encode(job.getJobData())); // double encoding?
job.setJobInfo(prefix+'JobDataEncoded', 'Yes', true);

}


}
logger.logEvent(0, 'EnableLNEMFPrinting=' + job.getJobInfo('EnableLNEMFPrinting'));
// Setting document index to next
getSetIndex(prefix, documentIndex);

}


Prerequisite

Enabling the print process of the LNEMF files requires downloading and installing a new version of Cloud Print Connector which is included in Lasernet Connector for Microsoft Dynamics 365 Finance and Operations 6.7.0 (version 1.2.0.0).


Cloud Print Connector can be downloaded with the help of the Download menu available on the Printers page (Lasernet > Setup > Lists > Printers).

Click here to download the package.

Helpful Unhelpful

1 of 2 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share