hi,
can anyone please help me with creating forms in python using the reportlab lib.
i am totally new to this and i would appreciate sample code
thanks
I have a process that creates form data in the form of an .fdf file that then has a reference to the .pdf document that is its "parent".
is it possible with any .NET process to save that .pdf file (populated with the data that came in from the .fdf)?
I need this because I need to email the fully populated .pdf documents out.
I've been just sending the .fdfs with fully qualified links to the pdfs, but some people are having problems with it and I'd rather just go full-blown pdf if I can do it.
FYI, my server does have a licensed copy of Acrobat installed if that matters....
This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.
I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When I developed this code I did it using TDD, but I've found my tests to be brittle as hell. Because each test essentially wanted to verify that for a given bit of input code (which happens to be a C++ header) I'd get a given bit of outputted code I wrote a small engine that reads test definitions from XML input files and generates test cases from these expectations.
The problem is I dread going in to modify the code at all. That and the fact that the unit tests themselves are a: complex, and b: brittle.
So I'm trying to think of alternative approaches to this problem, and it strikes me I'm perhaps tackling it the wrong way. Maybe I need to focus more on the outcome, IE: does the code I generate actually run and do what I want it to, rather than, does the code look the way I want it to.
Has anyone got any experiences of something similar to this they would care to share?
The problem is that I need to create in runtime a class like this:
public class Foo {
@Bar int value0;
@Bar int value1;
@Bar int value2;
....
}
with number of fields being decided at runtime.
I was looking at Javassist, and there you can create a new class, and add fields to it, but I haven't found a way to annotate those fields.
Hi
I am exporting data from php page to pdf
when the datas exceeed the page limit the header is not available for the consecutive pages
function where i call the export to pdf is
function changeDetails()
{
$bType = $this-input-post('textvalue');
if($bType == "pdf")
{
$this->load->library('table');
$this->load->plugin('to_pdf');
$data['countrytoword'] = $this->AddEditmodel1->export();
$this->table->set_heading('Country','State','Town','Name');
$out = $this->table->generate($data['countrytoword']);
$html = $this->load->view( 'newpdf',$data, true);
pdf_create($html, $cur_date);
}
}
This is my view page from which i export data to pdf
Name
Country
State
Town
Here I am getting the result as
page:1
Name country State Town
udaya india Tamilnadu kovai
chandru srilanka columbo aaaaa
page:2
vivek england gggkj gjgjkj
in the page 2 i dont get the headers name, country ,state and town
I'm creating a dynamically generated PDF using FPDF.
My PDF requires many exactly horizontal/vertical lines in a grid and when rendered they are anti-aliased and look very fuzzy and unacceptable to the client. I need to remove the anti-aliasing for these(or all) lines in the doc.
I know this is possible because it's shown correctly in the adobe pdf specs itself
http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf (warning: big file)
see the box in page 2 for how this should look.
How would I duplicate the box shown on this page?
We are writing a new application, and while testing, we will need a bunch of dummy data. I've added that data by using MS Access to dump excel files into the relevant tables.
Every so often, we want to "refresh" the relevant tables, which means dropping them all, re-creating them, and running a saved MS Access append query.
The first part (dropping & re-creating) is an easy sql script, but the last part makes me cringe. I want a single setup script that has a bunch of INSERTs to regenerate the dummy data.
I have the data in the tables now. What is the best way to automatically generate a big list of INSERT statements from that dataset?
I'm thinking of something like in TOAD (for Oracle) where you can right-click on a grid and click Save As-Insert Statements, and it will just dump a big sql script wherever you want.
The only way I can think of doing it is to save the table to an excel sheet and then write an excel formula to create an INSERT for every row, which is surely not the best way.
I'm using the 2008 Management Studio to connect to a SQL Server 2005 database.
Hi,
I'm trying to generate C# code classes with SvcUtil.exe instead of Xsd.exe. The latter is giving me some problems.
Command line:
SvcUtil.exe myschema.xsd /dconly /ser:XmlSerializer
Several SvcUtil problems are described and solved here:
http://blog.shutupandcode.net/?p=761
One problem I can't solve is this one: Error: Type 'DatafieldDescription' in namespace '' cannot be imported. Attributes must be optional and from namespace 'http://schemas.microsoft.com/2003/10/Seri
alization/'. Either change the schema so that the types can map to data contract types or use ImportXmlType or use a different serializer.
'
I changed
<xs:attribute name="Order" use="required">
to
<xs:attribute name="Order" use="optional">
and
<xs:attribute name="Order">
But the error remains. Is it possible to use attributes, or do I have to delete them all (in that case, this excercition is over)?
DOMPDF does not support floats.
However I am listing many tables, and they are mainly key & value pairs. I would like 2 of these tables to appear side by side.
i.e. if I could use floats
HTML
<table id="stuff">
...
</table>
<table id="other-stuff">
...
</table>
CSS
table#stuff {
float: left;
}
table#other-stuff {
float: right;
}
What sort of workaround can I do to support this? Or is it impossible?
I'm looking to do some side projects but don't have the time to hand code everything. What code generators has anyone used? Currently, I am looking at Iron Speed, but can't really afford to buy it. So I'm looking for a product under $300.00.
Any suggestions?
Jim
Hello colleagues,
Small preamble. I was good java developer on 1.4 jdk. After it I have switched to another platforms, but here I come with problem so question is strongly about jdk 1.6 (or higher :) ). I have 3 coupled class, the nature of coupling concerned with native methods. Bellow is example of this 3 class
public interface A
{
public void method();
}
final class AOperations
{
static native method(. . .);
}
public class AImpl implements A
{
@Override
public void method(){
AOperations.method( . . . );
}
}
So there is interface A, that is implemented in native way by AOperations, and AImpl just delegates method call to native methods.
These relations are auto-generated. Everything ok, but I have stand before problem. Sometime interface like A need expose iterator capability. I can affect interface, but cannot change implementation (AImpl).
Saying in C# I could be able resolve problem by simple partial:
(C# sample)
partial class AImpl{
... //here comes auto generated code
}
partial class AImpl{
... //here comes MY implementation of
... //Iterator
}
So, has java analogue of partial or something like.
Hi Everyone,
I have two PDFs that are made "on the fly" using Prawn PDF.
The PDFs are called jobsheet.pdf and discharge.pdf - their URL's are:
railsroot/kases/IDNO/jobsheet.pdf
railsroot/kases/IDNO/discharge.pdf
I am trying to work out how to automagically append the filename with the ID number:
railsroot/kases/IDNO/jobsheet_IDNO.pdf
railsroot/kases/IDNO/discharge_IDNO.pdf
To create the PDFs the code is as follows:
Kases Controller
def jobsheet
@kase = Kase.find(params[:id])
respond_to do |format|
format.html {} # jobsheet.html.erb
format.xml { render :xml => @kase }
format.pdf { render :layout => false }
prawnto :prawn => {
:background => "#{RAILS_ROOT}/public/images/jobsheet.png",
:left_margin => 0,
:right_margin => 0,
:top_margin => 0,
:bottom_margin => 0,
:page_size => 'A4' }
end
end
# GET /kases/1
# GET /kases/1.xml
def discharge
@kase = Kase.find(params[:id])
respond_to do |format|
format.html { } # discharge.html.erb
format.xml { render :xml => @kase }
format.pdf { render :layout => false }
prawnto :prawn => {
:background => "#{RAILS_ROOT}/public/images/discharge.png",
:left_margin => 0,
:right_margin => 0,
:top_margin => 0,
:bottom_margin => 0,
:page_size => 'A4' }
end
end
Routes
map.resources :kases, :member => { :discharge => :get }
map.resources :kases, :member => { :jobsheet => :get }
To view the PDF's I use the following links:
jobsheet_kase_path(@kase, :format => 'pdf')
discharge_kase_path(@kase, :format => 'pdf')
Is this even possible?
Thanks,
Danny
Basically my project is product based.
Once we developed a project and catch the multiple client and deploy the application based on their needs.
But We decided to put the new features and project dependent modules are as component.
Now my application got many number of customer.
Every customer needs a different features based on the component.
But we have centralized component for all client . we move the components additional feature to client specific folder and deploy.
My problem is , I am unable maintain the components features for multiple client.
My component feature code is increased and I am unable to track the client features.
Is there any solution for maintaining the multiple component features for multiple client ?
I want create a button option that takes the entire datalist and converts it to a pdf file. As anyone done this in asp.net ? Please can you show an example or direct me in the right way, thanks. God Speed
I'm using TCPDF and following this example which uses writeHTML and heredoc syntax to write a table.
http://www.tcpdf.org/examples/example_048.phps
I'm trying to do though is switch the font using setFont before writing each column. This means I have to break the html and write it on different pieces (see pseudo code). But once I break the HTML like that, it doesn't work, I think because it becomes invalid.
writeHTML <tr>
writeHTML first column
setFont()
writeHTML second column
writeHTML </tr>
I want to use writeHTML because it helps me write the table without having to manually construct. But how can I make modifications before I output each cell?
I have only two tables in my database with a one-to-many relationship between them (user hasMany messages) and am trying to get basic CRUD functionality going. Bake detects the associations correctly and specifies them correctly inside the model classes, but in controllers and views it looks like Cake doesn't know anything about those associations -- I don't even get a select tag for user_id when I go add a new message. Has anyone come across this problem before? What can I be doing wrong?
Table structure appears to be fine:
CREATE TABLE users (
id int(11) NOT NULL AUTO_INCREMENT,
username varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
email varchar(255) NOT NULL,
created datetime NOT NULL,
modified datetime NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`content` varchar(255) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Hi
I'm working with reportviewer in vs2008, whey I try to export my report to pdf it is creating pdf successfully..
But here my problem is when I'm exporting my pdf file is missing alt tags for images which is previously there in my report. In my reportviewer it is showing alt tags for every image. But in pdf it is not showing any alt tag for images.
Can somebody help me to solve this?
Thanks in advance
Hi,
Im trying to load a remote image into a pdf generated by tcpdf however I can't seem to get it to work?
The rest of the pdf loads fine and it looks like to trying to retrieve the image however it just does print to the page?
The code I am using is:
$pdf->Image("http://media.domain.com/logo.jpg", 0, 0, 100, 150, 'JPEG', '', 'T', true, 72,'','','','','','','');
Any help on this would be a massive help,
Thanks,
I am generating PDF documents using DevExpress XtraReports.
I am using the same image over and over (in rows of status lights).
The PDF generated seems to duplicate the image definition for each image included. I would prefer if it included the image once and referenced it wherever it needed another copy - this would drastically reduce the size of my PDF docs.
Is there any way to achieve this using DevExpress or even post processed via a third party application. Any help is appreciated.
I've used a tool from Aspose (Aspose.PDF.kit) to generate a JPG thumbnail on the fly of a PDF for a .NET application. This works great, but what kind of other alternatives are there? Codeproject.com has this tutorial, but it requires you to have the full version of Acrobat.
Is there an open source alternative that's geared for ASP.NET?
I'm searching for a library to edit already existing PDF's and add a watermark to each page, for example. Could also be blank every other page etc.
There seem to be a few PDF libraries out there, but only very few of them can edit existing PDF's and I'm a bit lost on which way to go.
Any recommendations?
Thank you.
I have an application which loads up c# source files dynamically and runs them as plugins. When I am running the main application in debug mode, is it possible to debug into the dynamic assembly? Obviously setting breakpoints is problematic, since the source is not part of the original project, but should I be able to step into, or break on exceptions for the code?
Is there a way to get codedom to generate PDBs for this or something?
Here is the code I am using for dynamic compliation.
CSharpCodeProvider codeProvider = new CSharpCodeProvider(new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } });
//codeProvider.
ICodeCompiler icc = codeProvider.CreateCompiler();
CompilerParameters parameters = new CompilerParameters();
parameters.GenerateExecutable = false;
parameters.GenerateInMemory = true;
parameters.CompilerOptions = string.Format("/lib:\"{0}\"", Application.StartupPath);
parameters.ReferencedAssemblies.Add("System.dll");
parameters.ReferencedAssemblies.Add("System.Core.dll");
CompilerResults results = icc.CompileAssemblyFromSource(parameters, Source);
DLL.CreateInstance(t.FullName, false, BindingFlags.Default, null, new object[] { engine }, null, null);
I'm working on a pretty complex DSL that I want to compile down into a few high level languages. The whole process has been a learning experience. The compiler is written in java.
I was wondering if anyone knew a best practice for the design of the code generator portion. I currently have everything parsed into an abstract syntax tree.
I was thinking of using a template system, but I haven't researched that direction too far yet as I would like to hear some wisdom first from stack overflow.
Thanks!
Does anybody know how to insert a "@RunWith anotation" above the class signature, using eclipse templates?
Ex.:
@RunWith(Parameterized.class)
public class MyClassTest {
...
@Parameters
public static Collection<Object[]> parameters() {
List<Object[]> list = new ArrayList<Object[]>();
list.add(new Object[] { "mind!", "find!" });
list.add(new Object[] { "misunderstood", "understood" });
return list;
}
...
}
__
Template:
// TODO: move this '@RunWith(Parameterized.class)' to class anotation
@Parameters
public static Collection<Object[]> parameters() {
${type:elemType(collection)}<Object[]> parametersList = new ${type:elemType(collection)}<Object[]>();
${cursor}// TODO: populate collection
return parametersList;
}
__ Thanks for the help!