473,602 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting the version of a PDF file using Crystal Reports and/or C#.

I've been looking on the web trying to find a solution to converting a
PDF Form from v.1.6(Acrobat 7) to PDF v1.4(Acrobat 5). It's one of
those weird situations where one of the applications I'm using requires
v.1.4. v.1.6 will mess up the application itself. PDFversion.exe (a
conversion utility) doesn't support the 1.6 format and Acrobat 7
doesn't want to do backwards conversion on a PDF Form (at least from
what I can see).

So... I figure I have 2 options: 1.) recreate the form using Acrobat
5, or 2.)use some of my knowledge of C# and crystal reports to create a
little database and generate form output using the Crystal Reports
engine built into Visual Studio 2005. The form way is probably
quicker... but I like programming, so option 2 sounds like more fun :)

My problem is that the PDFs that I'm creating via C#+Crystal Reports,
are version 1.3 (I can't win, lol). However, I did find some nifty
Java code that allows the version of a PDF to be controlled
programmaticall y. Does anyone know if theres a command/switch/etc...
that would allow me to define the version of the PDF I'm outputting
when I do:
someRPT.ExportT oDisk(CrystalDe cisions.Shared. ExportFormatTyp e.PortableDocFo rmat,"SomeFile. pdf");

For the Java code I found the following stuff:

// setting a PDF to version 1.3, 1.4, 1.5, or 1.6
import java.io.FileOut putStream;

import com.lowagie.tex t.Document;
import com.lowagie.tex t.Paragraph;
import com.lowagie.tex t.pdf.PdfWriter ;

public class PdfVersion1_3 {
public static void main(String[] args) {
Document document = new Document();
try {
PdfWriter writer = PdfWriter.getIn stance(document , new
FileOutputStrea m("PDFversion1_ 3.pdf"));
writer.setPdfVe rsion(PdfWriter .VERSION_1_3);
//writer.setPdfVe rsion(PdfWriter .VERSION_1_4);
//writer.setPdfVe rsion(PdfWriter .VERSION_1_5);
//writer.setPdfVe rsion(PdfWriter .VERSION_1_6);
document.open() ;
document.add(ne w Paragraph("This is a PDF-1.3 document"));
} catch (Exception ioe) {
System.err.prin tln(ioe.getMess age());
}
document.close( );
}
}


// setting a PDF to version 1.2
import java.io.FileOut putStream;

import com.lowagie.tex t.Document;
import com.lowagie.tex t.Paragraph;
import com.lowagie.tex t.pdf.PdfWriter ;

public class PdfVersion1_2 {
public static void main(String[] args) {
Document document = new Document();
try {
PdfWriter writer = PdfWriter.getIn stance(document , new
FileOutputStrea m("PDFversion1_ 2.pdf"));
writer.setPdfVe rsion(PdfWriter .VERSION_1_2);
document.open() ;
document.add(ne w Paragraph("This is a PDF-1.2 document"));
} catch (Exception ioe) {
System.err.prin tln(ioe.getMess age());
}
document.close( );
}
}

This all leads me to believe that there must be a way. Even if I don't
end up going the programming route, it's still good to know though.

Thanks in advance for any responses.
Wayne

Jan 25 '07 #1
0 1747

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3347
by: Devesh Aggarwal | last post by:
I developed reports in Crytsal Reports 9.0 in landscape mode. When i print the same from crystal reports it prints perfectly in Landscape even if the printer setting is set to potrait by default. But when i print the same report from the application developed in VB.Net the report is printed in potrait. I need to change the default setting to landscape everytime i Print the report. Do i need to pass orientation for each report in front...
5
3011
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields for reporting purposes and am wondering if anyone knows if this is easily accomplished using the .NET version of Crystal Reports? For example, the description column may be reporting on a dataentry error as follows: TXNCODE: 1010001
0
1749
by: JDP | last post by:
How do I tell what version of Crystal is being used in VS .Net? Is there a way to tell what version my report was created in? Details: During the installation of VS 2003 we were prompted and accepted installation of Crystal Reports. When we start the 9.0 or 8.5 installation crw32.dll we get an invalid keycode.dll dialog and the program quits.
2
6353
by: Stu | last post by:
Hi there, I am trying to set up a Crystal Report with the following tables: Customer Info: -Name -Address -CustomerID Orders:
1
3368
by: | last post by:
Hi, I am loading some crystal reports in a method similar to this (see below). And set the cursor to waiting while the reoprt is loaded, run and shown. BUT while the report is running the cursor changes back to default. I have tested setting it back to waiting after the call to run the report, - and it does get set. Has anyone else seen this wierd crystal bug I am also putting a message in the status bar - and this hold true the
5
7853
by: Glen Richards | last post by:
I've had no success in trying to dynamically set images at runtime in a Crystal Reports 9 report using C# 2005 Beta. I've been doing research along these lines & all the posts I've read say this can't be done. I was wondering if I've missed anything or if Crystal Reports 10 has added this feature? I downloaded a sample VB6 project (cr9_vb_rdc_loadpic.exe) from
3
1140
by: Lucas Tam | last post by:
Hi all, This is sort of an off topic post, but since many of you have used CR I thought I'll ask here. Does anyone know the difference between the bundled version of CR and the "full" version they sell? I called Business Objects and they said the full version only includes 1 instance of technical support and a users guide. However, I recall reading
4
1847
by: chad.a.morris | last post by:
I'm new to Crystal Reports, so this may be a dumb problem, but I just can't figure it out. Basically, I want to control the selected data in the C# code as opposed to Crystal Reports (since SQL is truly for querying, and Crystal Reports is more a reporting tool). The only way I've found to do this so far is to execute my select in C#, then store to an XML file, and then have the Crystal Report read the XSD and XML files. However, I...
1
2231
by: Kannan | last post by:
Hi, I have noticed that Visual studio 2005 coming along with Crystal report. I have few crystal reports which is developed in 6.0 in my existing VB project and currently we are migrating m y VB application to C#.net. In the crystal report site, I am not sure whether I have to redesign reports in Visual studio .net (or) Can I use the existing reports it self. My question is If I open my existing crystal reports (ver 6.1) in Visual
0
8401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6730
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.