How to create a pdf print out using Visual basic 2010? - vb.net

I read a webpage (link). It shows how to create a pdf file using VB. However, VB shows many errors after I follow the webpage to create my own pdf program. For example
mjwPDF.cls(1) : error BC30188: Declaration expected.
I am not sure whether it is a VB version difference problem. Does anyone know another pdf creator which is free?
Thanks

Related

HPGL File Viewer in vb.net

Hello Respected Everyone,
I'm a Beginner level programmer having working knowledge of vb.net. Currently I'm working on a program in VB.NET, which will extract labels from an HPGL file and print them on Thermal Printer. I've successfully read and extracted the Label Values from Label Command. Now I'm trying to create an HPGL viewer in my Program. I've searched the internet for any Library or sample program which can guide me through but haven't found any reasonable answer. Please Guide me how can I view an HPGL File in a vb.net program.
I'll provide more information if needed.
Thank You in advance...

using VB.net with itextsharp to create PDF/A-3

I'm successfully using VB.Net with itextsharp to save file as PDF but when I try to produce PDF/A-3, I have no idea on what function and parameter to use.
I can only find the sample code for C# but when trying to paste the code and convert to VB.net, it does not work.
Any example of VB.net from experience developer is very appreciated.

Microsoft Access - Missing Reference to acrobat.tlb

I am working with a Microsoft Access database that was mostly completed in Access 2010, and now I am opening it on a new computer that has Access 2013.
Upon opening the program, it tells me,
"Microsoft Access database or project contains a missing or broken reference to the file 'acrobat.tlb' version 1.1."
I have done some research, and I know that I need to go into the VB code and go under tools->references. Now under here it lists the working references then says,
"MISSING: Adobe Acrobat 10.0 Type Library"
So now I understand, that I need to give it the reference to that .tlb file. I am good up to here, but whenever I try to browse I can never find this file. I just downloaded Adobe, so I know I have the most recent version.
I saw a couple places in my research that you can just uncheck the box and try compiling again. This however does not work for me. it needs this reference for several things I am doing.
Has anyone ever had this problem or have any guidance for me?
Thank you!
I'm not 100% on this, but loading Adobe by itself may not give you the library you are looking for. You could need the file which is located in the SDK (which happens to be free) adobe site. Try installing this, and see if you can navigate to the tlb.
SQL hound was right. To expand on what he suggested and be more specific for this issue for those with this problem in the future, you need to download the Acrobat DC SDK (not the air one). In InterappCommunicationSupport/Headers you will find acrobat.tlb.
I am using Access 2013 and Acrobat Pro version 11.0.
I have looked for the file "acrobat.tlb" on my drives.
Found it under: "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat"
In the Visual Basic Code "tools/references", I clicked "Browse" and went to the location I have found, selected the file and clicked OK.
Returning back to "tools/references", the "Adobe Acrobat 10.0 Type Library" is now available and selected.
I have run minimal code to open and show the number of pages of the opened "pdf" document and it returned the proper number of pages.
Just so you know:
I now remember that there was a selection called only "acrobat", it is now gone. Must have been caused by selecting manually the desired file.
Maybe that selection was pointing to the "acrobat.tlb" file.
You can see the full path and name of the file corresponding to the selected library name at the bottom of the reference window.
I had the same problem but I had a Missing reference to "...Adobe 9...Type Library..." I unchecked that and tryed with, "Acrobat Access 3.0 Type Library" futher down. Then it worked.

Creating read-only Microsoft Word file using VB.net

I am trying to create a Microsoft Word file in VB.net which is read only.
My aim is that user will input the data in a Windows form, after pressing export button it'll get exported to a Word document. But here's a twist: I want this Word file to be read only.
Is there any option to do this? I have tried exporting through Crystal Report, but its still editable.
Any help would be appreciated.
You can use the File.SetAttributes method for that, I think. Check the MSDN site.

How to debug a corrupt pdf file? [duplicate]

This question already has answers here:
How do you debug PDF files?
(8 answers)
Closed 5 years ago.
im generating pdf files using a ruby library called "prawn". I have one particular file that seems to be considered "Corrupt" by adobe reader. It shows up fine in both preview and in adobe reader. It gives errors like:
Sometimes I get:
"Could not find the XObject named '%s'.
Othertimes I get:
"Could not find the XObject named "Im4".
Then always I get:
"An error exists on this page. Acrobat may not display the page
correctly. Please contact the person who created the PDF document to
correct the problem."
Is there a way to open a pdf with some tool and have it tell you what is technically wrong with the pdf? Im sure I could figure it out quickly with something like this...
thanks
Joel
A PDF is a dump of PDF objects so it sounds like objects are missing or the references pointing to the object are wrong. You can view a PDF in a text editor and see the refs table and you can see the PDF objects in Acrobat (I wrote a blog article on this at (http://pdf.jpedal.org/java-pdf-blog/bid/10479/Viewing-PDF-objects).
Your best bet might to take an Open Source tool like IText which can read PDFs and add some debugging code to get it to show the object structures.
the general post about debugging pdf might have been also helpful as rups / pdfstreamdump etc is mentioned there How do you debug PDF files?