/// Copyright (C) 2016 RunTex LLC
///
/// Permission is hereby granted, free of charge, to any person
/// obtaining a copy of this software and associated documentation
/// files (the "Software"), to deal in the Software without
/// restriction, including without limitation the rights to use,
/// copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following
/// conditions:
///
/// The above copyright notice and this permission notice shall be
/// included in all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
/// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
/// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
/// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
/// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
/// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
/// OTHER DEALINGS IN THE SOFTWARE.
namespace RunPDF
{
public class Constants
{
public static readonly string SERVICE_URL = "http://runpdf.com/export/?";
/// Default document name
public static readonly string DOC_NAME = "ExportedDocument.pdf";
/// Parameter key readonlyants
public static readonly string EXPORT_KEY = "EXPORT_KEY";
public static readonly string SOURCE_URL = "SOURCE_URL";
public static readonly string SOURCE_URL2 = "SOURCE_URL2";
public static readonly string SOURCE_HTML = "SOURCE_HTML";
public static readonly string SOURCE_BASE_URL = "SOURCE_BASE_URL";
public static readonly string AUTH_USERNAME = "AUTH_USERNAME";
public static readonly string AUTH_PASSWORD = "AUTH_PASSWORD";
public static readonly string TITLE = "TITLE";
public static readonly string STANDARD = "STANDARD";
public static readonly string DELIVERY_STREAM = "DELIVERY_STREAM";
public static readonly string NO_IMG_BRAKE = "NO_IMG_BRAKE";
public static readonly string LIVE_LINKS = "LIVE_LINKS";
public static readonly string ENABLE_SCRIPTS = "ENABLE_SCRIPTS";
public static readonly string FORMAT = "FORMAT";
public static readonly string ORIENTATION = "ORIENTATION";
public static readonly string SUBSET = "SUBSET";
public static readonly string HEADER_SOURCE_HTML = "HEADER_SOURCE_HTML";
public static readonly string FOOTER_SOURCE_HTML = "FOOTER_SOURCE_HTML";
public static readonly string FOOTER_SOURCE_URL = "FOOTER_SOURCE_URL";
public static readonly string HEADER_SOURCE_URL = "HEADER_SOURCE_URL";
public static readonly string HEADER_HEIGHT = "HEADER_HEIGHT";
public static readonly string FOOTER_HEIGHT = "FOOTER_HEIGHT";
public static readonly string FOOTER_SHOW_PAGE_NUMS = "FOOTER_SHOW_PAGE_NUMS";
public static readonly string MEDIA_TYPE_PRINT = "MEDIA_TYPE_PRINT";
public static readonly string MLTPL_START_NEW_PAGE = "MLTPL_START_NEW_PAGE";
public static readonly string SEC_OWNER_PASSWORD = "SEC_OWNER_PASSWORD";
public static readonly string SEC_USER_PASSWORD = "SEC_USER_PASSWORD";
public static readonly string SEC_ALLOW_PRINT = "SEC_ALLOW_PRINT";
public static readonly string SEC_ALLOW_EDIT = "SEC_ALLOW_EDIT";
public static readonly string SEC_ALLOW_COPY = "SEC_ALLOW_COPY";
public static readonly string WM_IMAGE_URL = "WM_IMAGE_URL";
public static readonly string WM_TEXT = "WM_TEXT";
public static readonly string WM_TEXT_POSITION = "WM_TEXT_POSITION";
public static readonly string WM_TEXT_FONT = "WM_TEXT_FONT";
public static readonly string WM_TEXT_FONT_SIZE = "WM_TEXT_FONT_SIZE";
public static readonly string WM_TEXT_COLOR = "WM_TEXT_COLOR";
public static readonly string WM_OPACITY = "WM_OPACITY";
/// Parameter key values
/// Boolean values
public static readonly string BOOLEAN_TRUE = "Y";
public static readonly string BOOLEAN_FALSE = "N";
/// Page format values
public static readonly string FORMAT_A0 = "A0";
public static readonly string FORMAT_A1 = "A1";
public static readonly string FORMAT_A2 = "A2";
public static readonly string FORMAT_A3 = "A3";
/// default
public static readonly string FORMAT_A4 = "A4";
public static readonly string FORMAT_A5 = "A5";
public static readonly string FORMAT_A6 = "A6";
public static readonly string FORMAT_A7 = "A7";
public static readonly string FORMAT_A8 = "A8";
public static readonly string FORMAT_A9 = "A9";
public static readonly string FORMAT_A10 = "A10";
public static readonly string FORMAT_B0 = "B0";
public static readonly string FORMAT_B1 = "B1";
public static readonly string FORMAT_B2 = "B2";
public static readonly string FORMAT_B3 = "B3";
public static readonly string FORMAT_B4 = "B4";
public static readonly string FORMAT_B5 = "B5";
public static readonly string FORMAT_ArchA = "ArchA";
public static readonly string FORMAT_ArchB = "ArchB";
public static readonly string FORMAT_ArchC = "ArchC";
public static readonly string FORMAT_ArchD = "ArchD";
public static readonly string FORMAT_ArchE = "ArchE";
public static readonly string FORMAT_Flsa = "Flsa";
public static readonly string FORMAT_HalfLetter = "HalfLetter";
public static readonly string FORMAT_Ledger = "Ledger";
public static readonly string FORMAT_Legal = "Legal";
public static readonly string FORMAT_Letter = "Letter";
public static readonly string FORMAT_Letter11x17 = "Letter11x17";
public static readonly string FORMAT_Note = "Note";
/// Error codes and messages
public static readonly string ERROR_CONNECTION_FAILED = "500";
public static readonly string ERROR_SERVER_UNEXPECTED = "610";
public static readonly string ERROR_INPUT = "620";
public static readonly string ERROR_ACCOUNT = "630";
public static readonly string ERROR_SERVICE_SUSPENDED = "634";
public static readonly string[,] ERROR_CODE_MESSAGE_MAP = {
{ ERROR_CONNECTION_FAILED, "Connection failed or service is unavailable. Please, verify your internet connection and try again." },
{ ERROR_SERVER_UNEXPECTED, "Unexpected error while processing the request. Please try again later." },
{ ERROR_INPUT, "Invalid input. Please verify your input and try again." },
{ ERROR_SERVICE_SUSPENDED, "The service is suspended. Please try again later." },
{ ERROR_ACCOUNT, "Invalid RunPDF account. For more information, login to your RunPDF account or contact support." }};
/// Page orientation values
/// portrait (default)
public static readonly string ORIENTATION_PORTRAIT = "P";
/// landscape
public static readonly string ORIENTATION_LANDSCAPE = "L";
/// Document standard
/// PDF (default)
public static readonly string STANDARD_PDF = "P";
/// PDF/A
public static readonly string STANDARD_PDF_A = "A";
/// PDF/X
public static readonly string STANDARD_PDF_X = "X";
/// Watermark position
/// default
public static readonly string WM_TEXT_POSITION_HORIZONTAL = "horizontal";
public static readonly string WM_TEXT_POSITION_DIAGONAL = "diagonal";
}
}