View makoconverter.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013-2019 Global Graphics Software Ltd. All rights reserved | |
* | |
* Simple sample application for conversions using the JawsMako APIs. | |
* Makes use of a separate thread to demonstrate use of IAbort() | |
*/ | |
#include <algorithm> | |
#include <exception> | |
#include <iostream> |
View makotransformer.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013-2021 Global Graphics Software Ltd. All rights reserved | |
* | |
* Example application for interruptible transforms using the JawsMako APIs. | |
* Demonstrates use of IAbort(), IProgressTick (int and float) and IProgressMonitor(). | |
*/ | |
#include <algorithm> | |
#include <exception> | |
#include <iostream> |
View StampAnnotation.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDocumentAssemblyPtr assembly = input->open(inputFilePath); | |
FRect fRect = FRect(192.0, 192.0, 276.0, 96.00); | |
auto red = IDOMColor::create(jawsMako, | |
IDOMColorSpaceDeviceRGB::create(jawsMako), 1.0f, 1.0f, 0.0f, 0.0f); | |
auto blue = IDOMColor::create(jawsMako, | |
IDOMColorSpaceDeviceRGB::create(jawsMako), 1.0f, 0.0f, 0.0f, 1.0f); | |
CAnnotationBorder annotationBorder(2.0f); | |
annotationBorder.type = CAnnotationBorder::eBTDashed; | |
annotationBorder.dash.resize(2); | |
annotationBorder.dash[0] = 4.0f; |
View GlyphTransformImplementation.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------- | |
// <copyright file="GlyphTransformImplementation.h" company="Global Graphics Software Ltd"> | |
// Copyright (c) 2019 Global Graphics Software Ltd. All rights reserved. | |
// </copyright> | |
// <summary> | |
// This example is provided on an "as is" basis and without warranty of any kind. | |
// Global Graphics Software Ltd. does not warrant or make any representations regarding the use or | |
// results of use of this example. | |
// </summary> | |
//----------------------------------------------------------------------- |
View DrawEllipse.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Draw an ellipse inside a rectangle using Bézier curves. Specify a square to draw a circle | |
void DrawEllipse(const IJawsMakoPtr jawsMako, IDOMFixedPagePtr& fixedPage, const FRect rect, | |
const double strokeThickness, const IDOMBrushPtr solidBrush) | |
{ | |
// We can approximate a circle using four béziers. This is the parameter that is | |
// used for this purpose | |
double l = ((0.7071067812 - 0.5) * 8.0 / 3.0); | |
// And so we will offset the bézier control points by half that amount as the entire | |
// circle is one unit in diameter. |
View MakeDeviceColor.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define a spot color | |
IDOMColorPtr MakeDeviceColor(const IJawsMakoPtr &jawsMako, String name) | |
{ | |
// Create a vector of colorants | |
IDOMColorSpaceDeviceN::CColorantInfoVect colorants; | |
// Add process color | |
colorants.append(IDOMColorSpaceDeviceN::CColorantInfo{ StringToU8String(name), 4, 0.5f, 0.6f, 0.0f, 0.4f }); | |
// We will generate a color space with a DeviceCMYK alternate. |
View makoconverter.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013-2020 Global Graphics Software Ltd. All rights reserved | |
* | |
* Simple sample application for conversions using the JawsMako APIs. | |
*/ | |
#include <algorithm> | |
#include <exception> | |
#include <iostream> | |
#include <stdexcept> |
View ImagePdf.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImagePdf | |
{ | |
private readonly IJawsMako m_mako; | |
private readonly IDocumentAssembly m_assembly; | |
private readonly IDocument m_document; | |
private readonly string m_outputPdf; | |
public ImagePdf(IJawsMako jawsMako, string pdfPath) | |
{ | |
m_mako = jawsMako; |
View MakoPJLReporter.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2020 Global Graphics Software Ltd. All rights reserved | |
* | |
* Simple sample application to report on job parameters in PJL-wrapped PCL, PCL/XL or Postscript, using Mako APIs. | |
*/ | |
#include <algorithm> | |
#include <exception> | |
#include <iostream> | |
#include <stdexcept> |
View DrawEllipse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Draw an ellipse inside a rectangle using Bézier curves. Specify a square to draw a circle | |
static void DrawEllipse(IJawsMako jawsMako, ref IDOMFixedPage fixedPage, FRect rect, | |
double strokeThickness, IDOMBrush solidBrush) | |
{ | |
// We can approximate a circle using four béziers. This is the parameter that is | |
// used for this purpose | |
double l = ((0.7071067812 - 0.5) * 8.0 / 3.0); | |
// And so we will offset the bézier control points by half that amount as the entire | |
// circle is one unit in diameter. |
OlderNewer