Skip to content

Commit

Permalink
Unicode support
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadelsucht committed Mar 21, 2021
1 parent 9033145 commit b92c727
Show file tree
Hide file tree
Showing 14 changed files with 543 additions and 72 deletions.
5 changes: 5 additions & 0 deletions BulkPDF/BulkPDF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
</EmbeddedResource>
<EmbeddedResource Include="FieldOptionForm.de.resx">
<DependentUpon>FieldOptionForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FieldOptionForm.resx">
<DependentUpon>FieldOptionForm.cs</DependentUpon>
Expand All @@ -146,6 +147,7 @@
</EmbeddedResource>
<EmbeddedResource Include="MainForm.de.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ProgressForm.de.resx">
<DependentUpon>ProgressForm.cs</DependentUpon>
Expand Down Expand Up @@ -188,6 +190,9 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="unifont.ttf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="App.config" />
Expand Down
Binary file modified BulkPDF/Example.xlsx
Binary file not shown.
28 changes: 27 additions & 1 deletion BulkPDF/Licenses.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

379 changes: 376 additions & 3 deletions BulkPDF/Licenses.resx

Large diffs are not rendered by default.

27 changes: 18 additions & 9 deletions BulkPDF/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions BulkPDF/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class MainForm : Form
ProgressForm progressForm;
int tempSelectedIndex;
bool finalize = false;

bool unicode = false;

public MainForm()
{
Expand Down Expand Up @@ -159,6 +159,7 @@ private void bFinish_Click(object sender, EventArgs e)
progressForm = new ProgressForm();
progressForm.Show();
finalize = cbFinalize.Checked;
unicode = cbUnicode.Checked;

BackgroundWorker backGroundWorker = new BackgroundWorker();
backGroundWorker.DoWork += backGroundWorker_DoWork;
Expand Down Expand Up @@ -187,7 +188,7 @@ void backGroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
try
{
PDFFiller.CreateFiles(pdf, finalize, dataSource, pdfFields, tbOutputDir.Text + @"\", ConcatFilename, progressForm.SetPercent, progressForm.GetIsAborted);
PDFFiller.CreateFiles(pdf, finalize, unicode, dataSource, pdfFields, tbOutputDir.Text + @"\", ConcatFilename, progressForm.SetPercent, progressForm.GetIsAborted);
}
catch (Exception ex)
{
Expand Down Expand Up @@ -402,6 +403,7 @@ private void bSaveConfiguration_Click(object sender, EventArgs e)
xmlWriter.WriteElementString("RowNumber", cbRowNumberFilename.Checked.ToString());
xmlWriter.WriteEndElement(); // </Filename>
xmlWriter.WriteElementString("Finalize", cbFinalize.Checked.ToString());
xmlWriter.WriteElementString("Unicode", cbUnicode.Checked.ToString());
xmlWriter.WriteElementString("OutputDir", tbOutputDir.Text);
xmlWriter.WriteEndElement(); // </Options>

Expand Down Expand Up @@ -494,6 +496,14 @@ private void bLoadConfiguration_Click(object sender, EventArgs e)

//// Other
cbFinalize.Checked = Convert.ToBoolean(xmlOptions.Element("Finalize").Value);
try
{
cbUnicode.Checked = Convert.ToBoolean(xmlOptions.Element("Unicode").Value);
}
catch
{
// Ignore. Ugly but don't hurt anyone.
}
tbOutputDir.Text = Environment.ExpandEnvironmentVariables(xmlOptions.Element("OutputDir").Value);

wizardPages.SelectedIndex = wizardPages.TabPages.Count - 1;
Expand Down
Loading

0 comments on commit b92c727

Please sign in to comment.