advanced pdf tools

how to append custom meta data like to PDF file?

Hello Sir,
Please tell me that how to append custom meta data like info.Add("Subject", Desc) but also not overwrite the previous meta data
i.e  Subject : abc , xyz, def....etc.

string abc = Server.MapPath("~//Files//") + "new" + PAddress;
PdfStamper writer = new PdfStamper(reader, new FileStream(abc, FileMode.Create, FileAccess.Write));
Hashtable info = new Hashtable();
info.Add("Subject", Desc);
writer.MoreInfo = info;
writer.Close();


When i used this it overwrite the previous meta data with the new meta data....but i don't want to overwrite the previous one....


Please reply me as soon as possible....

========================================
Our Advanced PDF Tools Command Line v3.0 product has this function, please download Advanced PDF Tools Command Line v3.0 from following web page to try,

https://www.verypdf.com/pdfinfoeditor/index.html#dl

https://www.verypdf.com/pdfinfoeditor/advanced_pdf_tools_cmd.zip

you can use following command lines to add new information to PDF file,


-y
There are several ways to add new information like follows:
Add new custom Properties to an existing PDF file and overwrite original custom Properties,
pdftools -i "C:\input.pdf" -o "C:\output.pdf" -y "key1=value1,key2=value2"
or
pdftools -i "C:\input.pdf" -o "C:\output.pdf" -y "/key1(value1) /key2(value2)"
Append new custom Properties  to an existing PDF file,
pdftools -i "C:\input.pdf" -o "C:\output.pdf" -y "+key1=value1,key2=value2"
or
pdftools -i "C:\input.pdf" -o "C:\output.pdf" -y "+/key1(value1) /key2(value2)"
e.g.
pdftools -i "C:\input.pdf" -o "C:\output.pdf" -y "Our Company=VeryPDF Company, Support Email=support@verypdf.com, Our Web URL=https://www.verypdf.com"
or
pdftools -i "C:\input.pdf" -o "C:\output.pdf" -y "/Our#20Company(VeryPDF Company) /Support#20Email(support@verypdf.com) /Our#20Web#20URL(https://www.verypdf.com)"
or
pdftools -i "C:\input.pdf" -o "C:\output.pdf" -y "+/Our#20Company(VeryPDF Company) /Support#20Email(support@verypdf.com) /Our#20Web#20URL(https://www.verypdf.com)"

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)
docconverter com

Support for DocConverter COM V2.5 pdfout.dll

We have purchased DocConverter COM V2.5 and we are using it with VeryPDF PDFcamp V2.5. When we try to invoke pdfout.dll functionality a message box is displayed which says that this is a trial version of DocConverter COM.

We have unregistered the old pdfout.dll and registered new pdfout.dll and we have created and added Interop.PDFOUTLib.dll into GAC. Could you please let us know why following message box for trial version is getting displayed?

Could you please let us know if pdfout.dll in DocConverter COM V2.5 is compatible with VeryPDF PDFcamp V2.5?
Also could you please let us know if DocConverter COM V2.5 compatible with VeryPDF PDFcamp V2.5 or VeryPDF PDFcamp V2.3?
========================
>>FAQ:
>>Question: Why I still get the message box, "This is a tiral version.."?

Because you have registered the trial version of pdfout.dll file in your computer
before, you need unregister the trial version of pdfout.dll file and re-register the
full version of pdfout.dll file again, then this message box will disappear.

For example,

Unregister the trial version of pdfout.dll file,

regsvr32 /u C:\doc2pdf_com_trial\pdfout.dll

re-register the full version of pdfout.dll file,

regsvr32 C:\doc2pdf_com_full\pdfout.dll

You can also replace (overwrite) the pdfout.dll file with the full version directly, or run "install_as_exe.bat" to install the new version of DocConverter COM into your system.

If you have another computer, you can install the full version to your another computer to try again, the full version hasn't this message box.

Additionally, if you wish call pdfout.dll from your code directly, you need call SetCode() method to set the License Key to pdfout.dll file, for example,
~~~~~~~~~~~~~~~~~~
'Set pdfCreator = CreateObject("Pdfout.PdfCreator")
Dim PdfCreator As PDFOUTLib.PdfCreator
Set PdfCreator = New PdfCreator
PdfCreator.SetCode ("XXXXXXXXXXXX") 'You need set a License Key at here
PdfCreator.html2PDF = szHTMLFilename
PdfCreator.filename = szPDFFilename
PdfCreator.CreatePDF
While PdfCreator.StillRunning = 1
DoEvents
'Call WaitMessage           'Please comment this line if you call HTML2PDF.exe from a Windows System Service
Wend
Set PdfCreator = Nothing
~~~~~~~~~~~~~~~~~~

VeryPDF
========================
We followed the mentioned step on a fresh installation and now we are not getting Trial Version message box.

We performed following steps=>
1. Install new system(OS)
2. register pdfout.dll
3. create interop dll using tlbimp

We have added PdfCreator.SetCode ("XXXXXXXXXXXXXX") to our code and we are creating instance of IPdfCreator.
Code snippent in our application:

private IPdfCreator myPDFcreator = null;
myPDFcreator = new PdfCreatorClass();
myPDFcreator.headersFooters = "off";
myPDFcreator.html2PDF = myMHT_Filename;
myPDFcreator.fileName = myPDF_Filename;
myPDFcreator.SetCode ("XXXXXXXXXXXXXXX");
myPDFcreator.CreatePDF();

Now we are getting SaveAs dialog while exporting, earlier without any registry change manually, the registry key AutomaticDirectory was getting updated with “myPDFcreator.fileName “ and hence no saveas message box was prompted but now the AutomaticDirectory registry value is not getting updated.

Could you please let us know how to suppress this save as dialog?

========================
Thanks for your message, you may rename "PDFcamp Printer" printer name to "PDFcamp Printer Driver" and try again, can you still see the SaveAs dialog?

also, you need set the values to correct items in the registry, you may run regedit.exe to open registry editor application first, search "pdfcamp" keyword, set following items to every found item,

AutomaticDirectory=C:\out.pdf   Type is: "REG_SZ"
AutomaticOutput=1               Type is: "REG_DWORD"
AutomaticValue=2                Type is: "REG_DWORD"
AutoView=0                      Type is: "REG_DWORD"

after you modified all found "PDFcamp" items in registry, please print a document to PDFcamp Printer, then you will get a "C:\out.pdf" file properly, you will not see Save As dialog during conversion.

If you wish use html2pdf.exe to convert documents to PDF files on x64 system, please refer to following information,

Please by following steps to use html2pdf.exe (included in DocConverter COM) on 64bit Windows Server System,

1. Please download and install 64bit version of PDFcamp Printer from following URL,

https://www.verypdf.com/pdfcamp/pdfcamp-printer-x64.exe

After you installed PDFcamp Printer (x64) product, please print a document to PDFcamp Printer, you will see a registration prompt dialog, please input your license key into this dialog, then you can create PDF file without any restrictions.

Once you registered the PDFcamp Printer product, the trial message will be removed from the created PDF files.

2. After you installed PDFcamp Printer x64 version, please go to Printer&Fax folder, rename "PDFcamp Printer" printer name to "PDFcamp Printer Driver",

3. Please download the DocConverter COM and unzip it to a folder, after you unzip it to a folder, please launch a CMD window with administrator right, change the current folder to the folder where "install_as_exe.bat" inside, "install_as_exe.bat" is included in DocConverter COM package.

4. Run "install_as_exe.bat" in CMD window with administrator right, you will install the DocConverter COM as a normal Windows application correctly,

Please notice, if you can't run "install_as_exe.bat" to install pdfout.dll library properly, please copy "pdfout.dll" to C:\window\syswow64 folder, run following command line with administrator right to register it by manual,

"c:\windows\syswow64\regsvr32.exe" C:\windows\syswow64\pdfout.dll

5. OK, you can run html2pdf.exe on your 64bit Windows Server 2008 R2 to convert documents to PDF files without any problem now,

6. If you wish install "VeryPDF DocConverter COM Service" on 32bit system, please run "install_as_service.bat" with administrator right, if you wish install "VeryPDF DocConverter COM Service" on 64bit system, please run "install_as_service_x64.bat" with administrator right, after you installed the service, you can call Doc2PDFCommandLine() function from ASP or C# code to convert documents to PDF files properly.


Please notice an important matter, pdfout.dll is a 32bit COM, so you need run your ASP application in 32bit mode or x86 platform, then your ASP code can access the 32bit pdfout.dll properly. If your ASP application run at x64 platform mode, it can’t access to the 32bit pdfout.dll, please notice this matter.

We suggest you may by following steps to "Enable 32-bit Applications" for IIS service,

1. Create a new application pool for the helpdesk application.
2. In the new pool's advanced settings, set "Enable 32-bit Applications" to true.
3. Right-click the helpdesk application's virtual directory in IIS manager,
make sure it has been converted to application. This makes it be a separate
web application which is independent to the parent site.
4. In the virtual directory's Basic settings, change it to use the new application pool.

You can also change the settings to your original Application Pool, please go to the Application Pool tied to the web application, Advanced Properties... and setting "Enable 32-bit Applications" to True, then your ASP code can call 32bit pdfout.dll correctly.

You can also refer to more information from following web pages,

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/405f5bb5-87a3-43d2-8138-54b75db73aa1.mspx?mfr=true

http://www.eggheadcafe.com/software/aspnet/33931176/iis-7-running-32-bit-app-in-64bit-server.aspx


if you still can’t get it work, please create a remote desktop account on your test machine, after we logged into your test machine, we will research this problem for you asap.

VeryPDF
========================
Continue to previous email.

I have double checked your code again, you should use Doc2PDFCommandLine() function to instead of CreatePDF() function, please refer to following steps,

2. How convert a HTML, DOC, DOCX, RTF, TXT, PPT, PPTX, XLS, XLSX, etc. file to PDF file from Windows Application Mode, via ASP, PHP, C#, etc. program languages?
Step 1:
1. Please download and install 64bit version of PDFcamp Printer from following URL,

https://www.verypdf.com/pdfcamp/pdfcamp-printer-x64.exe

After you installed PDFcamp Printer (x64) product, please print a document to PDFcamp Printer, you will see a registration prompt dialog, please input your license key into this dialog, then you can create PDF file without any restrictions.

Once you registered the PDFcamp Printer product, the trial message will be removed from the created PDF files.

Step 2:
After you installed PDFcamp Printer x64 version, please go to Printer&Fax folder, rename "PDFcamp Printer" printer name to "PDFcamp Printer Driver",

Step 3:
Please unzip full version of DocConverter COM software to a folder, run "install_as_exe.bat" to install DocConverter COM into your system, "doc2pdf_service.exe" will be run as a normal windows application,

Step 4:
Please use following example code to convert your documents to PDF files,
ASP Example:
<%
set PdfCreator = Server.CreateObject("PdfOut.PdfCreator")
ConvertHTMLToPDF1 PdfCreator,"http://www.google.com","google001.pdf"
set PdfCreator = nothing

function ConvertHTMLToPDF1(byval PdfCreator, strHTMLFile, strPDFFile)
'The first method to create a PDF file from HTML file
strPDFFile = server.mappath(".") & "\" & strPDFFile
dim strCommandLine
strCommandLine = """" + strHTMLFile + """"
strCommandLine = strCommandLine + " "
strCommandLine = strCommandLine + """" + strPDFFile + """"
strCommandLine = strCommandLine + " "
strCommandLine = strCommandLine + """" + "paperType=6" + """"
Response.write "HTML To PDF Command Line1 is: " & strCommandLine & "<br>"
PdfCreator.Doc2PDFCommandLine(strCommandLine)
end function
%>
PHP Example:
<?php
$url = "https://www.verypdf.com";
$outfile = "C:\\test.pdf";
$com = new COM("PdfOut.PdfCreator");
$com->Doc2PDFCommandLine("\"$url\" \"$outfile\" \"paperType=0,PrintHTMLBackground=yes,overwrite=yes\"");
?>
C# Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PDFOUTLib;

namespace FunWithVeryPDF
{
class Program
{
static void Main(string[] args)
{
try
{
PdfCreator wert = new PdfCreator();
wert.Doc2PDFCommandLine("""http://www.google.com"" ""C:\temp\out.pdf""")
wert = null;
Console.WriteLine("Done");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
Step 4:
You can convert .html, URL, .doc, .docx, .rtf, .ppt, .pptx, .xls, .xlsx, txt etc. files to PDF files from your ASP, PHP, C#, etc. program languages now.

*Please Notice: After you reboot the server, you need login your server via Remote Desktop with this user account ("doc2pdf_service.exe" was installed inside this user account), and close Remote Desktop, leave this user logged in, when you call Doc2PDFCommandLine() function, the conversion will be executed from this user account automatically.

VeryPDF
======================== 

By renaming the printer as "PDFCamp Printer Driver", Save as issue is solved.

Trial version dialog issue is also solved by "PdfCreator.SetCode ("XXXXXXXXXXX")".
But with old PdfCamp & DocConvertor versions, SetCode() was not required.
Please let’s know how it was handled previously and can we follow the same?

We observed one more issue, whenever we remotely logged into other systems from a PdfCamp installed machine, a "Save as" dialog is popping up as shown below.
Please look into this and let’s know how to fix the issue?
===================================
Thanks for your message, yes, the new version does use SetCode() function to register the pdfout.dll from your code, you can add .SetCode() function to all of your source code when you call pdfout.dll function, then you can use it without any restrictions.

We apologize for any inconvenience this may have caused to you, just a question, how do you call the DocConverter COM Service? Did you call it by Doc2PDFCommandLine() function and "doc2pdf_service.exe" application?

VeryPDF
===================================

Thanks for the Information regarding SetCode(). As you informed we will add SetCode() when we call pdfout.dll function.

Regarding second issue:

When we logged into other systems from a machine where only PDF camp printer is installed then also “Save as” dialog is popping up (issue is reproducible), so issue is independent of our application.

However we  are not using DocConverter COM Service.

===================================

Can be easily reproduced at your end, please follow the following steps to reproduce the issue.

1) Install Verypdf camp printer v2.5 on a Windows 7 machine.
2) Login remotely to Some other machine (using mstsc)
Some time after you login to other system a saveas dialog will pop up.

Due to security reasons we can’t install TeamViewer and give the remote login rights to the test machine.
If you need any further information regarding hardware/software environment , please don't hesitate to contact us.
======================================
Please open following file in notepad.exe application,

"C:\Program Files\PDFcamp Printer (x64) v2.5\config.ini"

Set "DisableSaveAsDialog=1" option in config.ini file, save it,

[options]
EmptyFileNameAfterPrinting=1
DisableSaveAsDialog=1
UseLocalMachine=0

Please try again, we hoping SaveAs dialog will not appear at this time.

VeryPDF
==================================
By setting the “DisableSaveAsDialog=1” option in config.ini file, SaveAs dialog issue is solved.Thanks for the support , you can close call.
==================================
Thank you for your message, if we can be of any other assistance, please feel free to let us know.

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)
html converter (htmltools)

Problem with bwidth parameter (HTMLTools.exe)

We are currently evaluating your HTMLTools.exe commandline tool for use in our server product. We plan to convert html pages on-the-fly to pdf files.

However, we are having a very basic issue with the product. Whatever we specify with the -width or -bwidth parameter, the output does look the same. We use the htm2pdf2 switch for the new rendering.

How can we control the virtual browser window width used for rendering the page ? Let's say the converter shall use a virtual 1280 pixel screen to render the html page. What would the command line look like ?

Your help is greatly appreciated.
====================================
-htm2pdf2 switch will ignore the -bwidth and -bheight parameters, if you need use -bwidth and -bheight parameters , you may remove the -htm2pdf2 parameter to try again.

VeryPDF
=====================================

Thanks for the quick reply.

We got it to work with the -widht and -height params and htm2pdf2.

We have another question: We are migrating from htmldoc.org converter, where we had a conditional linebreak command.  It worked like your embedded linebreak command (with a "magic word") but with an additional parameter to specify, how much room woul be needed to avoid the linebreak.  Example: <!--LINEBREAK-150--> would mean: If there at least another 150 units free of space on this page, do NOT perform a line break, otherwise DO perform a linebreak).

Do you see any possiblity to add this command to your product ? We could not live without that functionality and maybe other customers too.

Your feedback is greatly appreciated.
================================
>>We got it to work with the -width and -height params and htm2pdf2.

Yes, -htm2pdf2 does support -width and -height parameters, but -htm2pdf2 doesn't support  -bwidth and -bheight parameters.


Yes, you can insert " magic word " into the HTML file where you want to break into the new page, please refer to the attached HTML file and following command lines,

htmltools.exe -nocenter -playemf2 -width 612 -height 792 -breakpagebytext "Break page at here" "%CD%\test.htm" "%CD%\test_keep_breakpagetext.pdf"

htmltools.exe -nocenter -playemf2 -width 612 -height 792 -delbreakpagetext -breakpagebytext "Break page at here" "%CD%\test.htm" "%CD%\test_delete_breakpagetext.pdf"

you can use -breakpagebytext parameter to break long HTML file to multi-page PDF file automatically.

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)
verypdf blog

call EncrptPDF.exe (command line) from SAP ABAP programming

One of my client has requirement to Encrypt Payslips generated from SAP.


Now we are using concept creating PDF file and sending the same as a attachment to a mail with the help of SAP ABAP programming.

But in ABAP we don't have the facility of adding password to PDF file.

Now we are planning to use EncrptPDF(command line)to get the desired functionality.


We have download trail version of the same and it is working fine.

But we are not able to call this functionality from SAP. We do have different function modules to call external Programs or command from SAP like WS_EXECUTE.

Please let us know if any help available in  this regards.
====================================
You can use following sample code to Calling an Executable Program Using ABAP,

~~~~~~~~~~~~~~~~~~
REPORT  Z_Calling_EXE_Program.

CALL FUNCTION 'GUI_RUN'
EXPORTING
COMMAND          = 'C:\EncryptPDF.exe'
PARAMETER         = '-i c:\sample.pdf -w owner -u user -e 40 -p'.
*   CD               = '
* IMPORTING
*   RETURNCODE       = .
~~~~~~~~~~~~~~~~~~

VeryPDF
====================================
thanks for your help, it is working fine and as expected.

Please let us know if any possibility to use this tool on SAP Application server level, so that we can execute program in the Background for generating payslips.

====================================
Yes, you can call EncryptPDF.exe from SAP Application server level, that's no problem, you can try to do by yourself, if you encounter any problem, please feel free to let us know, we are glad to assist you asap.

VeryPDF
VN:F [1.9.20_1166]
Rating: 7.2/10 (5 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)
pdf to vector converter, xps to pdf converter

XPS to PDF and PDF to XPS

Trying to make some tests with your technology

Converting form PDF to XPS and the pdf2vec.exe
It runs fine in my windows 7 desktop computer, but fails in Windows Server 2008 R2..
No error message.

Appreciate your help.
===============================================
Information recorded in the eventlog

Faulting application name: pdf2vec.exe, version: 2.5.0.1, time stamp: 0x4bad956b
Faulting module name: pdftoolsdk.dll, version: 2.1.1.1, time stamp: 0x4a44259c
Exception code: 0xc0000005
Fault offset: 0x000f9001
Faulting process id: 0x2ff4
Faulting application start time: 0x01cc3693ae3b12a3
Faulting application path: C:\Users\mlen\Desktop\pdf2vec_cmd\pdf2vec_cmd\pdf2vec.exe
Faulting module path: C:\Users\mlen\Desktop\pdf2vec_cmd\pdf2vec_cmd\pdftoolsdk.dll
Report Id: ec8762af-a286-11e0-a273-00155d013213

===============================================
Please turn off DEP for "pdf2vec.exe" application to try again, please refer to following steps about how to turn off DEP in your system,

1. Click "Start"
2. Select "Control Panel"
3. Select "System"
4. Click the "Advanced" tab
5. In the "Performance" region select "Settings"
6. Click the "Data Execute" tab in the dialog box that opens
7. Select "Turn on DEP for all programs and services except for those I select"
8. Click "Add"
9. The open dialog box will open. Browse and select "pdf2vec.exe" application in your computer,
10. Click "Open"
11. Click "Apply"
12. Click "Ok"
13. Reboot

OK, you can run "pdf2vec.exe" without any problem now, please to try.

VeryPDF
===============================================
Can I run parallel processes or threads in the same machine, converting from pdf to xps?
===============================================

Yes, you can run multiple instances of PDF2Vector on same machine to convert more PDF files to XPS files at same time, that’s no problem.

VeryPDF
===============================================

Thanks it work,

Is there any way I can call a DLL directly through .Net C# or I need to convert only through the command line.

Other question: is there  a way to convert from XPS to PDF?

Regards,
======================================
>>Is there any way I can call a DLL directly through .Net C# or I need to convert only through the command line.

You can call "PDF to Vector Converter SDK" from our website to try,

http://www.verydoc.com/pdf2vec_sdk.zip

You can call "PDF to Vector Converter SDK" from C# code easily, please refer to following sample code,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Runtime.InteropServices;

namespace PDF2Vector
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
int nRet;
string strCmd;
strCmd = "pdf2vec" & " -$" & " XXXXXXXXXXXXXXXXXXXX"
strCmd = strCmd & " d:\temp\11.pdf"
strCmd = strCmd & " C:\out.swf"
nRet = VeryPDF_PDF2Vector(strCmd);
}
[DllImport("pdf2vec.dll", EntryPoint="VeryPDF_PDF2Vector",  SetLastError=true,
CharSet=CharSet.Ansi, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern int VeryPDF_PDF2Vector(string strCommandLine);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can also refer to detailed C# examples in the pdf2vec_sdk.zip package.


>>Other question: is there  a way to convert from XPS to PDF?

Yes, you can use our XPS to PDF Converter Command Line to convert XPS file to PDF file, XPS to PDF Converter Command Line can be downloaded from following web page,

http://www.verydoc.com/xps-to-pdf.html

VeryPDF
======================================
I was testing verydoc. I have some questions.

Do it can't detect Japanese or Chinese fonts?. When I use a pdf with ckj languages, it only brings me images.

There is another things. When I open multiple instances of the app. It opens splwow64.exe too, and I would think it close when the app close, but it didn't.
======================================

>>Do it can't detect Japanese or Chinese fonts?. When I use a pdf with ckj languages, it only brings me images.

XPS to PDF doesn't support Japanese and Chinese fonts in the current version, we are planning support CJK languages in the future releases.


>>There is another things. When I open multiple instances of the app. It
>>opens splwow64.exe too, and I would think it close when the app close, but it didn't.

splwow64.exe is controlled by Windows system, it is not launched by our XPS to PDF Converter, we can do nothing to splwow64.exe, please understand.

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)