@VeryDOC SDK & COM

How to convert PDF to image and modify PDF in various programming languages

In this article, you will know how to use SDK to convert PDF to image and modify PDF in support programming languages. If interested, please keep reading it here.

Here, tool we use is VeryDOC PDF Parser & Modify SDK. It supports converting PDF file to image files, e.g., PDF to PNG, PDF to JPG, PDF to BMP, PDF to JP2, etc.. Moreover, it enables you to modify PDF files in text content, edit image resolution/color depth, process password protected PDF files, extract text from source PDF files, etc.. Most import, this tool could be used as a component to design your own tools by integrating supported functions to those tools flexibly, which could be processed in various programming languages, such as VB, VC++, Delphi, ASP, VB.NET, C#, etc..

Want to know more about this tool and this related topic? The following examples unveil more info after you get trial version VeryDOC PDF Parser & Modify SDK:

VB.NET example to show you how to convert PDF file to image file and modify PDF file by text:

Private Sub DiskFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TestSDK.Click

Dim nRet As Integer

Dim strOptions As String

Dim strInPDFFile As String

Dim strOutFile As String

Dim strLogMsg As String

Dim nDPI As Integer = 300

'Render PDF pages to PNG image files first

strInPDFFile = Application.StartupPath() & "\example1.pdf"

strOutFile = Application.StartupPath() & "\out.png"

strOptions = "-r " & CStr(nDPI) & " -$ XXXXXXXXXXXXXXXXXXXX"

nRet = VeryPDF_PDFParserSDK(strInPDFFile, strOutFile, strOptions)

strLogMsg = strInPDFFile & vbCrLf & strOutFile & vbCrLf & strOptions & vbCrLf & "nRet = " & Str(nRet)

MsgBox(strLogMsg)

'default DPI is 72DPI in PDF file, so you need calculate position by 72DPI,

'you can read the text contents and position from output HTML file

Dim x, y, w, h, hPDF, bRet, nPage As Integer

Dim strOldText, strNewText As String

x = 1333 * 72.0 / nDPI

y = 237 * 72.0 / nDPI

w = 151 * 72.0 / nDPI

h = 27 * 72.0 / nDPI

nPage = 1

strOldText = "September"

strNewText = "VeryDOC"

strOutFile = Application.StartupPath() & "\modified.pdf"

hPDF = VeryDOC_ModifyPDF_OpenFile(strInPDFFile, strOutFile)

bRet = VeryDOC_ModifyPDF_ModifyText(hPDF, nPage, x, y, w, h, strOldText, strNewText)

VeryDOC_ModifyPDF_CloseFile(hPDF)

MsgBox("Process completed." & vbCrLf & "VeryDOC_ModifyPDF_ModifyText() return: " & CStr(bRet))

End Sub

VC++ example to illustrate how to modify PDF with text:

int Test_PDFParserSDK_ModifyPDF()

{

char szPDFFile[_MAX_PATH];

GetModulePath(szPDFFile, "example1.pdf");

char szOutPDFFile[_MAX_PATH];

GetModulePath(szOutPDFFile, "_modified.pdf");

VeryPDF_ModifyPDF_SetCode(LICENSE_KEY_PDFMODIFYSDK);

HANDLE hPDF = VeryPDF_ModifyPDF_OpenFile(szPDFFile, szOutPDFFile);

if(hPDF == NULL)

return 0;

int nPage = 1;

//The default DPI for these values is 72DPI

int dpi = 72;

int x = 319*72/dpi;

int y = 56*72/dpi;

int nWidth = 37*72/dpi;

int nHeight = 7*72/dpi;

char *lpOldText = "October";

char *lpNewText = "VeryDOC.COM";

BOOL bRet = VeryPDF_ModifyPDF_ModifyText(hPDF, nPage, x, y, nWidth, nHeight, lpOldText, lpNewText);

VeryPDF_ModifyPDF_CloseFile(hPDF);

return 1;

}

In the end, if you have any questions, please share them with us through comments left here. Welcome to try or buy VeryDOC PDF Parser & Modify SDK. And for all functions are encapsulated in DLL Library, it is of need to purchase developer license if you need to apply all functions for design of new tools.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
@VeryDOC SDK & COM

How to convert PDF to HTML/image with SDK

Want to know how to use SDK to achieve basic operation of converting PDF to HTML or PDF to image? Please follow me in this article.

VeryDOC PDF Parser & Modify SDK is a great component for programmers to fulfill conversion from PDF files to HTML/various images and integrate related functions into utility programmers need to design. This component could be used in multiple programming languages, e.g., VB, ASP.NET, VB.NET, C#, Delphi, C/C++. And all the functions were encapsulated into DLL Library, which only could be obtained if you purchase developer license. For more info about this component, just directly visit homepage of VeryDOC PDF Parser & Modify SDK.

After you get free VeryDOC PDF Parser & Modify SDK, welcome to read the paragraphs below to know more details about converting PDF file to image/HTML from following examples:

VB example:

Private Sub Command1_Click()

Dim nRet As Long

Dim strOptions As String

Dim strInPDFFile As String

Dim strOutFile As String

strInPDFFile = App.Path & "\example1.pdf"

strOutFile = App.Path & "\out.png"

strOptions = "-$ XXXXXXXXXXXXXXXXXXXX"

nRet = VeryPDF_PDFParserSDK(strInPDFFile, strOutFile, strOptions)

MsgBox (Str(nRet))

End Sub

C# example:

private void DiskFile_Click(object sender, EventArgs e)

{

string appPath = Path.GetDirectoryName(Application.ExecutablePath);

int nRet;

string strOptions;

string strInPDFFile;

string strOutFile;

string strLogMsg;

strInPDFFile = (appPath + "\\example1.pdf");

strOutFile = (appPath + "\\out.htm");

strOptions = "-$ XXXXXXXXXXXXXXXXXXXX";

nRet = VeryPDF_PDFParserSDK(strInPDFFile, strOutFile, strOptions);

strLogMsg = (strInPDFFile + ("\r\n"

+ (strOutFile + ("\r\n"

+ (strOptions + ("\r\n" + ("nRet = " + (nRet.ToString()))))))));

MessageBox.Show(strLogMsg);

}

Besides converting PDF file to image/HTML, VeryDOC PDF Parser & Modify SDK supports extracting image data or text data from input PDF files, such as, getting and analyzing text data from source PDF file, as well as supporting color depth setting, resolution setting, page range setting for image files and processing password protected PDF files, etc.. For more info, you can download or purchase VeryDOC PDF Parser & Modify SDK right now to check contained files there in each folder.

At last, thank you for reading this article, if you encounter any questions during using VeryDOC PDF Parser & Modify SDK, please leave comments here, or just email to support@verydoc.com to make us know immediately.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
PDF Password Remover

Can VeryDOC PDF Password Remover be called by script?

VeryDOC PDF Password Remover has command line version for users to call it by script easily. In this article, how to remove PDF password in script with this tool can be shown to you in details as you expect.

If GUI interface of this tool could not suit you, maybe CMD version can make you simply achieve decryption of removing PDF passwords through command lines and parameters. Here is CMD example for you to refer to below, and I hope this tool can bring you fun:

Step1. Download

Please download package of VeryDOC PDF Password Remover directly, and then, after you extract its content to your computer, executive file “pdfdecrypt.exe” could be in your computer for later application.

Step2. Run cmd.exe in Windows systems

After extraction, you can run cmd.exe in your computer, so, targeting command prompt window, which is running environment of command lines, could pop on screen.

Step3. Accomplish removing PDF passwords

Firstly, please get familiar with usage:

pdfdecrypt.exe –i <input PDF> –o <output PDF> [options]

Note: If you do not specify the -o parameter, the default output file will overwrite the input PDF file.

where [options] can be following parameters with strings except “-i, –o”

  • -i [pdf file name] : decrypt PDF filename or directory
  • -o [pdf file name]: PDF file will be generated
  • -u <string>: input user password
  • -w <string>: input owner password
  • -v: view the decrypted PDF file after decryption
  • -l [log file name]: specify log file for output message

Then, you can refer to the following examples to use parameters to achieve process you want:

pdfdecrypt.exe -i C:\sample.pdf -o C:\decrypt.pdf -w owner -u user -l C:\error.log

pdfdecrypt.exe -i C:\sample.pdf -w "owner" -u "user"

pdfdecrypt.exe -i C:\sample.pdf -o C:\out1.pdf -w "owner"

pdfdecrypt.exe -i C:\sample.pdf -o C:\out2.pdf -u "user"

pdfdecrypt.exe -i C:\pdfdir\ -o D:\ -l C:\error3.log

In addition, if you need to batch remove passwords of PDF files, please type correct commands line as above in a BAT file, then, after you save them and close this BAT file and double-click its icon, you can get targeting PDF files without passwords in destination folder.

Here is the end of this article, I hope simple method to remove PDF files passwords singly or in batches satisfy your needs from the easy-to-operate command line examples mentioned above. If you have any questions, please feel free to leave your comments here. To own this tool for good, just choose full version of VeryDOC PDF Password Remover.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
PDF Password Remover

How to remove PDF master passwords in batches

Only several clicks helps you remove PDF passwords of master in batches as you expect.

Firstly, you need to know which tool we need to use in this conversion – VeryDOC PDF Password Remover. This utility enables you to remove PDF owner passwords with restrictions directly. And of course, if PDF open passwords are already known by you, it is still instant to help you remove PDF open passwords singly or in batches. To know more info about this tool, please visit homepage of VeryDOC PDF Password Remover.

What is PDF master password?

PDF master password, which is also referred to as owner password or permissions password, enables you to change any security settings, i.e. permissions, user or master password, etc.. Master password protected PDF file can be opened for changing by supplying master password essentially. In addition, the privilege of master password for PDF file, is that permission setting restriction, e.g., printing allowed or not, extraction of text allowed or not, etc., can be edit, as well as other popular certain restrictions

And then, want to know details about this theme mentioned in title, after you get trial version of VeryDOC PDF Password Remover? The following description reveals more details about removing PDF master passwords in batches with GUI interface:

1. Run GUI interface

Double-click software shortcut, so, GUI interface pops on screen to prepare for later operations.

2. Add owner password protected PDF files

To add PDF files quickly, it is allowed to drag and drop PDF files into processing form, and then, selected PDF directory can be displayed in this table on GUI interface to indicate successful adding.

3. Set targeting folder to automatically remove PDF master passwords

Along with finishing adding PDF, program provides a dialog box for you to choose destination folder, and then, one click on Ok enables processing of removing PDF owner password instantly and directly. Then, you can find successful information appearing in processing form as shown in following snapshot:

Successful process of removing PDF owner passwords in batches with GUI interface

If you do the operations as described above, you can achieve conversion of removing PDF owner passwords in batches. You can have priority to get full version of VeryDOC PDF Password Remover here.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
PDF Password Remover

Why can some PDF passwords not be removed by VeryDOC PDF Password Remover?

This article aims showing what PDF passwords can be or can not be removed during removing PDF passwords with restrictions with VeryDOC PDF Password Remover.

Like you can tell, VeryDOC PDF Password Remover supports instantly removing PDF owner passwords with restrictions, as well as open passwords known by users previous. However, not any kinds of encrypted PDF passwords could be supported to remove, as well as specified PDF files. So, in the following paragraphs, what can be of removing or not by this tool would be shown in the following description:

What VeryDOC PDF Password Remover support based on PDF type and encryption modes:

  • For PDF type - support up to PDF version 1.8, including Acrobat 9.0 PDF files
  • For encryption level - remove 40 bits and 128 bits RC4 encryption owner passwords
  • For encryption mode – 128 bits AES - remove AES encryption owner passwords

What VeryDOC PDF Password Remover does not support:

  • PDF files which are not what software itself supports
  • PDF passwords set without what I mentioned in supported encryption modes
  • PDF passwords encrypted beyond mainstream encryption of PDF
  • PDF passwords encrypted with specific Adobe Plug-ins
  • PDF passwords which are set by not Adobe Corporation

By now, maybe you need to experience this tool, so, it is easy for you to try VeryDOC PDF Password Remover here. And then, you wonder what encryption modes Adobe Corporation have designed for us, then, please read the following extension knowledge:

Basically, three main ways can be used to encrypt a PDF file by Adobe Corporation:

  • Password encryption

Password encryption is a technology, which depends on a shared password by publisher and recipients. If you do not understand this, here is an example:

Suppose the publisher use a string like “No1Kn0w$” to encrypt PDF, and then, the recipients need to use the same string to decrypt it.  However, to prevent this encryption from being attacked by brute force, as well as guessing of simple passwords, please make sure complex passwords, e.g., like song lyrics, poetry, and other long phrases as source material of PDF passwords to set.

  • Public Key Infrastructure (PKI) encryption

PKI encryption, which is a further technology, help you set greater protection by using additional cryptography and digital certificates.

For instance, while encrypting, the publisher’s computer randomly generates a symmetric key(up to AES256), and encrypts that key to each recipient’s asymmetric public key to include in the document with the symmetric key encrypted content.  In return, the recipient computer uses their own private key to decrypt the symmetric key, and then decrypt the document.  When the private key is stored on a token, e.g. USB, etc., it can provide two factor security, which are requiring the token and any PIN codes to unlock this token.

  • Rights Management

Rights Management, which has been developed to provide integration into enterprise authentication (AuthN) and authorization (AuthZ) infrastructure without requiring PKI, could be used in those same directories to read in groups of users.

With this technology, rights management “policy”, which is an easily reusable way to protect documents, can be created by administrators. In this kind of policy, how to open the document, what you can do with the document and what can be tracked based on what users have done with the document, can be set professionally and easily as you wish. The publisher then selects the policy to protect a document. In addition to username/password types of authentication, the server can also support Kerberos single sign on (SSO),PKI authentication (which is different than PKI encryption above), OTP, and other custom methods.  With the professional help of this technology, document usage can be expired, revoked, version controlled, watermarked, and audited. Thus, it is great to use this brilliant technology for communities of users. In addition, this technology can be compatible with popular smart phones and tablet devices.

At last, what are important is that, three encryption methods mentioned above, are all possible to restrict printing, clipboard, and modification as usual.

In the end, welcome to share your problems and questions with comments here, if you encounter them during removing PDF passwords with VeryDOC PDF Password Remover.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)