LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to overwirte data in a *.pdf file using LabVIEW??

Highlighted

hi,

i have a requirement to overwrite a pdf file using LabVIEW, i have to use coloring text also.

i have downloaded Exaprom PDF 1.0 toolkit. but it is to generate a new pdf file.

please suggest ideas

 

regards

phani srikanthSpell Check

phani srikanth
0 Kudos
Message 1 of 8
(2,533 Views)
Highlighted

Is it possible? Sure. If you know the PDF file format.

 

Otherwise, you have to find a PDF creator/editor that has an external API, like an ActiveX interface, or perhaps a .NET interface. Adobe Acrobat has one. Of course, you have to buy Adobe Acrobat.

0 Kudos
Message 2 of 8
(2,524 Views)
Highlighted

I did not have the PDF file format. If I have that what is the procedure to edit/overwrite the particular data.?

 

 

Yes I have downloaded Adobe Acrobat X pro Trail Version. I am finding difficulty to read the data from from a PDF file.

It will be very helpful if you explain the procedure or provide an sample VI

phani srikanth
0 Kudos
Message 3 of 8
(2,507 Views)
Highlighted

Modifying an existing PDF file is several magnitues more complicated than creating one from scratch. The PDF standard is VERY complicated and contains a myriad of features with their specific syntax elements. In order to modify an existing PDF you have to be able to understand every syntax element that occures in the PDF, or you may end up corrupting the file.

 

When you create a new PDF you can pick out the syntax elements that your tool supports and forget about the 95 other procent.

 

There are many PDF Toolkits than can create PDF files, a few that can open PDF files and present them, and almost none that can edit them. The Adobe PDF Editor being one of the few that can do that, but nobody is going to give away such a Toolkit for free.

Rolf Kalbermatter
Averna BV
0 Kudos
Message 4 of 8
(2,499 Views)
Highlighted

@srikanthphani wrote:

I did not have the PDF file format. If I have that what is the procedure to edit/overwrite the particular data.?

 

 

Yes I have downloaded Adobe Acrobat X pro Trail Version. I am finding difficulty to read the data from from a PDF file.

It will be very helpful if you explain the procedure or provide an sample VI


I have no procedure or VI to do this. You will need to look at the examples that ship with Acrobat to see how to use the ActiveX component. There may be examples posted on this forum. Search for them.

 

You can call ActiveX from LabVIEW. There are examples that ship with LaBVIEW on calling ActiveX.

0 Kudos
Message 5 of 8
(2,485 Views)
Highlighted

If you know exactly where you want to overwrite a PDF file, it is possible with iTextsharp (Exaprom PDF uses iTextsharp).  However, like it is said in the previous answers, if you have to read the PDF file to find the location where you want to overwrite, it will probably be a lot more difficult...

 

The example within the Exaprom PDF library has, in fact, two major steps:

 

1) Create a PDF file (without footer, header, and watermark)

               a) create a PDF file name “File A”;

               b) add everything except footer, header, and watermark;

               c) close “File A”,

2) Overwriting the footer, the header, and the watermark

               a) Read “File A”

               b) overwrite the footer, the header, and the watermark;

               c) Close “File A”.

 

In my case, it is easy because I know exactly where (X,Y) I want to overwrite those elements (In fact, it is a bit more complicated because I need to create a temporary file).

Jean-Marc
LV2009 and LV2013
Free PDF Report with iTextSharp
0 Kudos
Message 6 of 8
(2,462 Views)
Highlighted

I did something in the past that may get you started. It is part of a bigger piece of code and not easy to extract.

 

You can use the 'stamper' functionality to open and modify a pdf file. It has been some time ago so I don't know if you can also use the stamper to locate stuff in the pdf.

 

I attached a screenshot of my code (which inserts a TOC that I create after making the document) but this also doesn't work without flaws (yet..).

 

Please keep us updated if you find a good solution.

 

Kind regards,

 

Mark

 

pdf stamper.PNG

0 Kudos
Message 7 of 8
(2,234 Views)
Highlighted

@ericward wrote:

So in conclusion the answer to this question is no, right? I think you can try the advice from J-M, the iTEXT seems to be a feasible solution. It is free and many people have already used it for processing pdf files.


The answer to the question "is possible" is yes, the question of "how" has not been answered yet.

0 Kudos
Message 8 of 8
(2,058 Views)