How to call docPrint SDK from Delphi code? I’m changed all the DLL Import functions from Pchar to PAnsiChar parameters

We have created a test package with Delphi language to you, please test it in attachment.

You can compile and run it in Delphi6, click "Print MS Word document (*.doc)" button, select a DOC file, then you will get an output JPG file in the D:\ folder.

Can you work fine with this Delphi6 example?

btw, if you are not using Delphi6, you need change string settings to ANSI instead of UNICODE, docPrint_Register() parameters is support ANSI characters only,

rslt := docPrint_Register(Pchar('XXXXXXXXXX'),Pchar('Damarco'));

VeryPDF
----------------------------------------------------
Thanks,

Delphi6 is very outdated, and I no longer use it. Currently I am using Delphi XE5 and XE7.

I used your advice and changed all the DLL Import functions to PAnsiChar parameters.

Function docPrint_Register(lpRegCode: PAnsiChar; lpCompanyName: PAnsiChar) : longint; stdcall; external 'doc2img.dll' name 'docPrint_Register';

and function calls:

rslt:=docPrint_Register(PAnsiChar('XXXXXXXXXX'),PAnsiChar('Damarco'));

This appears to be working. Once I have a little more coffee, I'll start some more in-depth testing and I will report back to you.

Thanks.
Customer
----------------------------------------------------
When ran as a normal application, this is working.

The reason I wanted to move to the DLL version is I expected this would eliminate all the issues I have trying to get this to run as a windows service. However, I have found this does not help.

I have been running a windows service on windows 2008 with Docprint Pro 5. This has been working well. However, it does not with on Windows server 2012R2.

I have tried using the DLL, COM Objects, and CreateProcess with command line. All do the same thing. I see Doc2PDF.exe gets started, then it hangs. I have no idea if its displaying message box or if its having another issue.

What I need is for Doc2PDF to work from within a windows service, running on Windows 2012R2, and I need it completely unattended. No desktop interaction. How can I achieve this? I am converting http URLS, and .txt files to PDF (Office not needed).

Thanks
Customer
----------------------------------------------------
I understand your situation, when you call doc2pdf.exe from server side application, doc2pdf.exe will be run inside SYSTEM user account, but MS Office is not work properly from SYSTEM user account, this is a limitation in MS Office, so doc2pdf.exe will hang. In order to solve this problem, you need run doc2pdf.exe or Office DCOM inside an interactive user account instead of SYSTEM user account, then you will get it work fine.

Our Knowledge Base is contain more examples and solutions for this situation,

http://www.verypdf.com/wordpress/category/docprint-pro

for example,

Please look at "Example 6" and "Example 7" from following web page,

Example 6: Run conversion via "docPrint_Service.exe" application,

http://www.verypdf.com/artprint/docprintsdk.htm

Example 7: Run conversion inside an interactive user account from service or web applications,

http://www.verypdf.com/artprint/docprintsdk.htm

You can also call "docPrintCom.exe" from your code to convert office files to PDF files, please look at following web pages for more information,

http://www.verypdf.com/wordpress/201403/verypdf-release-notes-verypdf-has-release-a-new-docprintcomexe-for-docprint-sdk-product-40311.html

http://www.verypdf.com/wordpress/201412/doc2img-dll-library-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-exception-from-hresult-0x8007000b-41125.html

In order to convert office files to PDF files by "docPrintComExe", you can run "C:\Program Files (x86)\docPrint Pro v6.0\docPrint_Service.exe" as a normal Windows EXE application first, then you can run following code to convert your office files or HTML files to PDF files,
------------------------------
strLicenseKey = "XXXX-XXXX-XXXX-XXXX"

set docPrintObj = CreateObject("docPrintComExe.docPrint")

'Please run "docPrint_Service.exe" application before you call this function
nRet = docPrintObj.RunCmdViaDocPrintService("-* " & strLicenseKey & " -i D:\temp\test.docx -o D:\temp\out2.pdf", 1, strLicenseKey)
------------------------------

The following is another VBScript source code, you can port it to Delphi code easily,

------------------------------
strInputFile = "http://www.verypdf.com"
strLicenseKey = "XXXX-XXXX-XXXX-XXXX"

Set fso = CreateObject("Scripting.FileSystemObject")
strFolder = fso.GetParentFolderName(wscript.ScriptFullName)
strOutputFile = strFolder & "\output.pdf"

Set docPrint = CreateObject("DocPrintComExe.docPrint")
nRet = docPrint.docPrintCOM_Register(strLicenseKey, "VeryPDF.com Company")
nRet = docPrint.RunCmd("-i " & strInputFile & " -o " & strOutputFile & " -* " & strLicenseKey & " -s ""htmlheader=VeryPDF Page Header"" -s ""htmlfooter=VeryPDF Page Footer""", 1)

If (fso.FileExists(strOutputFile)) Then
   msg = strOutputFile & " exists."
Else
   msg = strOutputFile & " doesn't exist."
End If
MsgBox msg
------------------------------

Above solutions are all need run "C:\Program Files (x86)\docPrint Pro v6.0\docPrint_Service.exe" as a normal Windows EXE application by manual after a user logged into system, if your server is nobody to logged in, you can use "VeryPDFComRunCmd COM Component" to run doc2pdf.exe from Administrator user account directly,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

"VeryPDFComRunCmd COM Component" can be used to run any EXE from any User account, we sure this COM will solve this problem to you completely.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in docPrint Pro | Tagged , | Leave a comment

VeryPDF OCR SDK for Developers, Document/Layout Analysis for OCR, Layout Analysis SDK, Page Layout Analysis Library for Developers

VeryPDF Layout Analysis SDK allows to analyze the layout of any document using complex algorithms,  able to recognize with high accuracy the different kind of areas in the page.

VeryPDF Layout Analysis SDK identifies the following types of areas:

  • text
  • inverted text
  • noise
  • images (pictures or drawings)
  • tables (rows, columns and cells)
  • horizontal and vertical lines

Before the "character" recognition will take place, the logical structure of the document has to be be analyzed and defined. For example:

  • Where are text blocks, paragraphs, lines?
  • Is there a table that should be reconstructed?
  • Are there any "images" on the page(s)?
  • Are there any barcodes to read?

VeryPDF OCR technology contains several variants of Document Layout Analysis:

Automatic Document Analysis

The Document Analysis searches and "finds" zones for recognition on the document images. Here how it works:

  • The Document Analysis algorithms detect different elementary objects on the image, e.g.
            words or parts of words,
            separators,
            connected components,
            color gradients, inverted, text areas,
            …etc.
  • Then, based on this information, hypotheses for these blocks are formed and checked:
            What is type of the block?
            Where are the borders of the block?
            What type of the document layout could it be (magazine, newspaper, book page) ?

The following screenshot of VeryPDF OCR SDK shows the result of a analyzed layout (text, image and table blocks) , as well as the reconstructed output.

image

or on a multi-column magazine page with intelligent layout analysis & reconstruciton,

image

Generated MS Word document with two columns,

image

If there would be no intelligent layout analysis, but use only use one large text block, then the results may contain messy text contents only.

Automatic Document Analysis in the SDKs can work in the different modes available in the OCR-SDKs:

  • Full layout analysis – Text, images, tables and barcodes are detected - see samples above.
  • Index mode - tries to find as much text on the image - even if they are embedded in images
  • Mode for Invoices and documents with complex tables
  • Barcode mode - ignores text and images, it only looks for barcodes
  • Lines mode - only returns the text in lines, even in a multi-column document

To get the best result from the analysis, the quality of the image to process needs to be the best quality possible. To help us in this process, we could use some of VeryPDF Image Processing libraries, like:

Deskew
Using Hi-capacity scanners, sometimes the ADF dekew the paper: you can solve this problem using VeryPDF Deskew SDK: in this way you will get perfect images without re-scan, correcting the wrong inclination of the document automatically and quickly. You can deskew until 45° and the angle may be calculated using two methods: text analysis or finding the black border. For more information please give a look to VeryPDF Deskew SDK.

Despeckle and noise removal
Scanning from copies or microfilm, dust and dirt may add some noise on the images. You can avoid this problem using our VeryPDF Despeckle Library. You just need to determine how big a dust element can be (i.e. 2x2 pixels). For more information visit VeryPDF Despeckle SDK page.

Black border removal and auto-cropping
This Black Border Removal SDK allows the automatic black  border detection and removal  in monochrome or grayscale images. The black border is produced in the images acquired by scanners when paper size is smaller than scanning area or in images acquired from microfilm, microfiches and aperture-cards. Removing the border from the images is a very important pre-processing step that improves the compression rate, reducing file size, and the visualization aspect. For more information visit VeryPDF Black Border Removal SDK page.

Sun Pricing and ordering info

For more information about VeryPDF Layout Analysis Library, VeryPDF Deskew SDK, VeryPDF Despeckle SDK, VeryPDF Black Border Removal SDK, please feel free to contact us via VeryPDF Ticket System, we will reply to you asap,

http://support.verypdf.com/open.php

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in OCR Products, VeryPDF SDK & COM | Tagged , , | Leave a comment

I am looking for the best, fastest way to send multiple PDF documents to print to a given network printer. Will PDFPrint Command Line product suit my needs?

Hello,

I am looking for the best, fastest way to send multiple PDF documents to print to a given network printer.

The methods I have found involve instantiating an instance of a process, passing arguments and that works, however, Adobe Acrobat GUI loads (and stays open) which is undesirable. With the GUI starting up, opening the file, displaying it and sending it to print...it must be wasting time. By the way, in my testing, I found it takes about 40 seconds to send five, one-page PDF documents to print that way.

About your command line PDF printer...

1. Is your command line utility truly non-GUI?

2. If I have to send 10 or 100 or 1000 print jobs to different printers, once I send them via your tool will it print as fast as the printers can spool them up?

3. Your overview mentions you can merge multiple printing jobs into one job. Would that be equivalent to Acrobat Pro merging PDF documents into one document and sending that one merged document to print?

I am thinking that if I can group 10-20 PDFs into one print job, it should be more efficient. Is that a fair assumption?

4. What kind of component is this? Does it get installed on a server and then I simply call it from my code? (I'm working with a C# web service)

5. What are the differences between the server and developer licenses? Why the large cost difference?

Please call me back so we can discuss these questions, your product, and which is the best fit for our needs.

Thank you.
Customer
----------------------------------------------------

image
>>1. Is your command line utility truly non-GUI?

Yes, PDFPrint Command Line is a pure Command Line application, it is not contain any GUI at all.

>>2. If I have to send 10 or 100 or 1000 print jobs to different printers, once I send them via your tool will it print as fast as the printers can spool them up?

Yes, you can use PDFPrint Command Line to print 10 or 100 or 1000 PDF files to different printers at same time, this will expedite your printing speed.

>>3. Your overview mentions you can merge multiple printing jobs into one job. Would that be equivalent to Acrobat Pro merging PDF documents into one document and sending that one merged document to print?

No, it is not same as merging function in Acrobat Pro.

Acrobat Pro does merge PDF files first and them print merged PDF file to Windows Printer.

PDFPrint Command Line does work by following steps,

1. Open Printer Device,
2. Print first PDF file,
3. Print second PDF file,
4. Print third PDF file,
5. Print 4td, 5th, ..., etc. PDF files,
6. Close Printer Device,

PDFPrint Command Line hasn't merging function, so it will save the time on merging, it does print PDF files directly to Windows Printer.

>>I am thinking that if I can group 10-20 PDFs into one print job, it should be more efficient. Is that a fair assumption?

Yes, you can group 10-20 PDFs into one print job, but this will not improve the performance, because "mergeprintjobs" option is not used to improve the performance, in most cases, it is used to combine print jobs into one print job, for example, using "mergeprintjobs" option, you can,

1. Combine several PDF files into one PCL file when you print to a PCL Printer,
2. Combine several PDF files into one XPS file when you print to "Microsoft XPS Document Writer",
3. Combine several PDF files into one Postscript file when you print to a Postscript Printer,
4. Combine several PDF files into one big print job instead of one PDF file by one print job,
5. and more similar purposes.

If you just want to improve printing performance, you can try to print more PDF files concurrently, this will great improve printing speed.

>>4. What kind of component is this? Does it get installed on a server and then I simply call it from my code? (I'm working with a C# web service)

Yes, you can install "PDFPrint SDK" to your server and then call it from your C# code to print PDF files,

http://www.verypdf.com/app/pdf-print-cmd/try-and-buy.html#buy-sdk
http://www.verypdf.com/pdfprint/pdfprint_sdk.zip

Please refer to a sample C# code at below,
------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using pdfprintcom;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            pdfprintcom.pdfprint pdfPrintObj = new pdfprintcom.pdfprint();
            pdfPrintObj.com_PDFPrint("pdfprint -printer \"docPrint\" D:\\temp\\5.pdf");
        }
    }
}
------------------------------------------------

>>5. What are the differences between the server and developer licenses? Why the large cost difference?

Server License is licensed by one server, you will need to purchase a server license for each server.

Developer License can be run on any number of servers.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in PDF Print | Tagged , | Leave a comment

How can I extract fonts from a PDF file? Extract embedded PDF fonts to an external ttf file using some utility or script. Extract embedded fonts from PDF fast and easy

I have a question, given I had PDF files with embedded fonts -- how can I extract those fonts in a way that they are re-usable as regular font files? Are there (preferably free) tools which can do that? Also: can this be done programmatically?

Customer
------------------------------------------------------------
Is there a way to extract fonts from PDF files?

I know that usually embedded fonts in PDF files are only subsets of the fonts. Anyway, is there a way to do this?

Customer
------------------------------------------------------------
Though bear in mind: Some documents with custom fonts are made as PDFs just for the purpose that those fonts should not be available to everybody.

Meaning they are copyrighted to their respective owner. Which in turn means if you plan to use said copyrighted font you can get in a lot of trouble.

Yes, not every font is free. There are fonts that cost hundreds of buck too.

Customer
------------------------------------------------------------
Is it possible to extract fonts that are embedded in a PDF file to an external ttf file using some utility or script?

If the fonts used in the PDF are absent in the system there are two possibilities:

1. If they are absent in the PDF files as well (not embedded), we can only use similar system font basing on the font name.

2. If they are embedded in the PDF file, then I want to know is it possible at all to extract them to external ttf files so that I can compile each of them to separate swf files at run-time?

Customer
------------------------------------------------------------
Hello.

I'm trying to extract all fonts included in a PDF file.

There are hundreds, so it should be helpful if there is a way to do it from the command line.

I found the "scripting" thing in fontforge. But "Open(file.pdf)" always opens the first font inside the PDF file.

Any way to select the others? Or any other way to do it?

Thanks.
Customer
------------------------------------------------------------
Solution:

VeryPDF lets you extract embedded TrueType fonts, subsetted TrueType fonts, OpenType fonts, type1 fonts and all other font types from PDF files to .ttf font files on the local disk, you can reuse these .ttf fonts in MS Word, Adobe Photoshop and other applications easily.

You can download a trial version of "VeryPDF PDF Font Extractor Command Line" from following web pages,

http://www.verypdf.com/app/pdf-font-extractor/try-and-buy.html
http://www.verypdf.com/dl2.php/pdffont_win.zip

After you downloaded pdffont_win.zip, extract the contents in a folder. Copy the PDF from which you want to extract the fonts from in the same folder. Giving the fact that this software it is a command line version I recommend you to rename you PDF to make it easy on typing. With win+R or Start->Run, open a command prompt window. Navigate to the folder with pdffont.exe. and run it. The result will be a list of commands and attributes which enables you to extract almost anything you want from your PDF.

for example, you can run following command line to extract all fonts from your PDF file to .ttf font files in a folder,

pdffont.exe font.pdf .\dir

after above command line is finished, you will see some .ttf font files in output folder, you can copy these .ttf font files to C:\windows\fonts folder, then you can use them in MS Word and Adobe Photoshop and other applications easily.

image

Extracted barcode TrueType fonts,

image

Extracted English Algerian font, because this font is a subset font in PDF file, so some characters are missed from extracted TTF font file, as you see in the below screenshot, C, G, H, I, J, K, L, etc. characters are not included in the TFF font file,

image

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in VeryPDF SDK & COM | Tagged , , | Leave a comment

VeryPDF provides a series of PDF Products to Developers

VeryPDF is provide a series of PDF Products in the PDF field, please look at some of them at below,

http://www.verypdf.com/custom/select-pdf-products.htm

image
---------------------------------------
PDF Viewing: Display PDF files inside your application,

PDF Viewer OCX Control, http://www.verydoc.com/pdf-viewer-ocx.html
PDF Editor OCX Control (ActiveX), http://www.verypdf.com/app/pdf-editor/try-and-buy.html#buy-dev
HTML5 Web PDF Viewer, http://www.verypdf.com/online/free-view-document-online.php
---------------------------------------
PDF Rasterization / Image Extraction: Convert PDF pages to images and extract raw images,
PDF2Image is command-line program for high-quality conversion from PDF to various image file formats (e.g. PNG, JPEG, BMP, TIFF and RAW).

http://www.verypdf.com/app/pdf-to-image-converter/try-and-buy.html#buy-cmd
http://www.verypdf.com/app/pdf-to-image-converter/try-and-buy.html#buy-ext
---------------------------------------
PDF Printing: Print PDF files,

http://www.verypdf.com/app/pdf-print-cmd/try-and-buy.html#buy
---------------------------------------
PDF Text Extraction: Convert PDF pages to plain text,
PDF2Text is a command-line software for high-quality and efficient text extraction from PDF. PDF2Text can be used to extract text from any PDF document as Unicode or as structured XML.

http://www.verypdf.com/app/pdf-to-txt-converter/try-and-buy.html#buy-cvt
---------------------------------------           
PDF Splitting / Merging: Split or combine PDF files to make new PDF files,
PDF PageMaster is a command-line utility for splitting, editing, merging and securing PDF documents.

http://www.verypdf.com/app/pdf-split-merge/try-and-buy.html#buy-cmd
---------------------------------------
PDF Analysis / Inspection: Extract metadata, color usage, and other information from PDF files

http://www.verypdf.com/app/pdf-extract-tool/try-and-buy.html
http://www.verypdf.com/app/advanced-pdf-tools/try-and-buy.html#buy-cmd
http://www.verypdf.com/app/pdftoolbox/try-and-buy.html#buy
---------------------------------------
PDF2XPS is a multi-platform stand-alone command-line application for high-quality and relaible conversion from PDF to XPS (XML Paper Specification). The high-quality conversion maintains the original document quality and preserves hyperlinks, colors and fonts.

PDF2SVG is a multi-platform command-line application for high-quality conversion from PDF to SVG (Scalable Vector Graphics).

http://www.verydoc.com/pdf-to-vector.html
---------------------------------------
PDFSecure is a multi-platform command-line utility used to secure PDF documents as well as remove, or change security settings on existing PDFs.
SecurSign (PDF Security and Signature): Encrypt, Digitally Sign and Verify Digital Signatures on PDF Documents.

http://www.verypdf.com/app/encrypt-pdf/try-and-buy.html
http://www.verypdf.com/app/pdf-security-and-signature/try-and-buy.html#buy
---------------------------------------
PDF to PDF/A Converter: Convert existing normal or image PDF files into fully searchable ISO 19005-1 and ISO 19005-2 compliant achievable documents.

http://www.verydoc.com/pdf-to-pdfa.html
---------------------------------------
TIFF to PDF Converter: Convert legacy scanned TIFF documents into fully searchable and achievable PDF/A documents.

http://www.verypdf.com/app/image-to-pdf-ocr-converter/try-and-buy.html#buy-cvt-cmd
---------------------------------------
Scan to Word OCR Converter Command Line,
Scan to Excel OCR Converter Command Line,
Scan to Searchable PDF OCR Converter Command Line,

http://www.verypdf.com/app/ocr-to-any-converter-cmd/try-and-buy.html#buy

---------------------------------------

View more PDF products,

http://www.verypdf.com/product/all.html

http://www.verypdf.com/custom/select-pdf-products.htm

http://www.verydoc.com/products.html

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in VeryPDF SDK & COM | Tagged | Leave a comment
Page 1 of 1,30412345...102030...Last »