Skip to content

Commit

Permalink
delete/uncomment table stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienSchminke committed Jun 15, 2023
1 parent ca32981 commit e9a3ca1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ autoexamples = false
edition = "2021"

[dependencies]
# for table development
grid = "0.10.0"

# minimum dependencies
lopdf = { version = "0.27.0", default-features = false, features = [
"pom_parser",
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ extern crate js_sys;

pub use lopdf;

pub mod table;
//pub mod table;
pub mod color;
pub mod ctm;
pub mod date;
Expand Down
4 changes: 2 additions & 2 deletions src/pdf_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl From<PdfLayer> for lopdf::Stream {
}

impl PdfLayerReference {
/// Add a table to the layer.
/* /// Add a table to the layer.
/// - [x] TODO add table based on given columns and rows
/// - [ ] TODO possibility to set column_lines manually
pub fn add_table(&self, column_count: u8, row_count: u8, bottom_left_corner: Point, width: Mm, height: Mm) {
Expand Down Expand Up @@ -90,7 +90,7 @@ impl PdfLayerReference {
self.add_operation(operation);
}
}

*/

/// Add a shape to the layer. Use `closed` to indicate whether the line is a closed line
/// Use has_fill to determine if the line should be filled.
Expand Down
4 changes: 2 additions & 2 deletions src/table.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate grid;
/*extern crate grid;
use grid::Grid;
use crate::Mm;
Expand All @@ -18,4 +18,4 @@ enum ColumnLineConfiguration<S: Into<String>> {
/// Please use `Automatic` or `Manually` instead.
/// - [ ] in progress
ContentAdapting(Grid<S>),
}
}*/
4 changes: 2 additions & 2 deletions tests/add_table_tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::fs::File;
/*use std::fs::File;
use std::io::BufWriter;
use printpdf::BuiltinFont;
use printpdf::{Mm, PdfDocument, Point};
Expand All @@ -11,4 +11,4 @@ fn pdf_document_with_table() {
current_layer.add_table(3, 10, Point::new(Mm(20.0), Mm(150.0)), Mm(100.0), Mm(100.0));
document.save(&mut BufWriter::new(File::create("test_table.pdf").unwrap())).unwrap();
}
}*/

0 comments on commit e9a3ca1

Please sign in to comment.